add FreeBSD
This commit is contained in:
8
Makefile.bsd
Normal file
8
Makefile.bsd
Normal file
@@ -0,0 +1,8 @@
|
||||
CFLAGS ?= -Wall -fPIC -ggdb -O2 $(OPTS) $(INCLUDE) $(DEFINES)
|
||||
LDFLAGS ?= -s -lpthread -lcrypto -lm -lrt -lz -L.
|
||||
|
||||
OBJ = bin/bsd
|
||||
EXECUTABLE = bin/tinysvcmdns-bsd
|
||||
|
||||
include Makefile
|
||||
|
||||
BIN
bin/tinysvcmdns-bsd
Normal file
BIN
bin/tinysvcmdns-bsd
Normal file
Binary file not shown.
Binary file not shown.
4
mdnsd.c
4
mdnsd.c
@@ -123,7 +123,7 @@ static int create_recv_sock(uint32_t host) {
|
||||
return r;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
if ((r = setsockopt(sd, SOL_SOCKET, SO_REUSEPORT,(char*) &on, sizeof(on))) < 0) {
|
||||
log_message(LOG_ERR, "recv setsockopt(SO_REUSEPORT): %m");
|
||||
}
|
||||
@@ -695,7 +695,7 @@ struct mdns_service *mdnsd_register_svc(struct mdnsd *svr, const char *instance_
|
||||
void mdns_service_remove(struct mdnsd *svr, struct mdns_service *svc) {
|
||||
struct rr_list *rr;
|
||||
|
||||
assert(srv != NULL && svc != NULL);
|
||||
assert(svr != NULL && svc != NULL);
|
||||
|
||||
// modify lists here
|
||||
pthread_mutex_lock(&svr->data_lock);
|
||||
|
||||
Reference in New Issue
Block a user