Merge pull request #2 from chincheta0815/sunos

Added ability to compile on sunos targets.
This commit is contained in:
philippe44
2016-12-26 00:54:51 -08:00
committed by GitHub
3 changed files with 14 additions and 2 deletions

9
Makefile.sunos Normal file
View File

@@ -0,0 +1,9 @@
CC = gcc
CFLAGS = -Wall -fPIC -O2 $(OPTS) $(INCLUDE) $(DEFINES)
LDFLAGS = -lpthread -lcrypto -ldl -lm -lrt -lsocket -lnsl -lz -L.
OBJ = bin/i86pc-solaris
EXECUTABLE = bin/tinysvcmdns-i86pc-solaris
include Makefile

BIN
bin/tinysvcmdns-i86pc-solaris Executable file

Binary file not shown.

View File

@@ -36,18 +36,21 @@
#include <in6addr.h>
#include <ws2tcpip.h>
typedef uint32_t in_addr_t;
#elif defined (linux) || defined (__FreeBSD__)
#elif defined (linux) || defined (__FreeBSD__) || defined (sun)
#include <unistd.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <net/if.h>
#if defined (__FreeBSD__)
#if defined (__FreeBSD__) || defined (sun)
#include <ifaddrs.h>
#include <net/if_dl.h>
#include <net/if_types.h>
#endif
#if defined (sun)
#include <sys/sockio.h>
#endif
#elif defined (__APPLE__)
#include <unistd.h>
#include <sys/socket.h>