diff options
| author | Harald Welte <laforge@gnumonks.org> | 2014-12-04 14:15:36 +0100 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2014-12-04 14:15:36 +0100 | 
| commit | e15ac060e7ae78d4c3569d7fc9071bcf49807e05 (patch) | |
| tree | a90fc81b1197e28b668a98f175543d705edf775f /src/ctrl | |
| parent | 20144f7bc5c04e57da36cd7d7883f576510f0298 (diff) | |
fix libosmocore build for NuttX target
this fixes some compilation issues with libosmocore under NuttX,
particularly as some #defines are missing or some header files are
slightly different.
Diffstat (limited to 'src/ctrl')
| -rw-r--r-- | src/ctrl/control_if.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index c20c1e0f..dc191209 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -31,10 +31,12 @@  #include <arpa/inet.h> -#include <netinet/tcp.h>  #include <netinet/in.h> +#ifdef HAVE_NETINET_TCP_H +#include <netinet/tcp.h> +#endif -#include <sys/fcntl.h> +#include <fcntl.h>  #include <sys/ioctl.h>  #include <sys/socket.h>  #include <sys/types.h> @@ -378,6 +380,7 @@ static int listen_fd_cb(struct osmo_fd *listen_bfd, unsigned int what)  	LOGP(DLCTRL, LOGL_INFO, "accept()ed new control connection from %s\n",  		inet_ntoa(sa.sin_addr)); +#ifdef TCP_NODELAY  	on = 1;  	ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));  	if (ret != 0) { @@ -385,6 +388,7 @@ static int listen_fd_cb(struct osmo_fd *listen_bfd, unsigned int what)  		close(fd);  		return ret;  	} +#endif  	ccon = ctrl_connection_alloc(listen_bfd->data);  	if (!ccon) {  		LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate.\n");  | 
