michael@574: Index: command.c michael@574: --- command.c.orig 2006-08-19 09:10:40 +0200 michael@574: +++ command.c 2006-08-24 12:14:21 +0200 michael@574: @@ -72,6 +72,9 @@ michael@574: #include "pyextend.h" michael@574: #include "honeyd_overload.h" michael@574: #include "util.h" michael@574: +#ifndef HAVE_SETENV michael@574: +#include "setenv.h" michael@574: +#endif michael@574: michael@574: ssize_t atomicio(ssize_t (*)(), int, void *, size_t); michael@574: michael@574: Index: compat/getopt.h michael@574: --- compat/getopt.h.orig 2006-08-19 09:10:40 +0200 michael@574: +++ compat/getopt.h 2006-08-24 12:14:21 +0200 michael@574: @@ -40,7 +40,11 @@ michael@574: #ifndef _GETOPT_H_ michael@574: #define _GETOPT_H_ michael@574: michael@574: +#ifdef HAVE_SYS_CDEFS_H michael@574: #include michael@574: +#else michael@574: +#include "cdefs.h" michael@574: +#endif michael@574: michael@574: /* michael@574: * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions michael@574: Index: compat/sha1.h michael@574: --- compat/sha1.h.orig 2006-08-19 09:10:40 +0200 michael@574: +++ compat/sha1.h 2006-08-24 12:14:21 +0200 michael@574: @@ -15,7 +15,11 @@ michael@574: unsigned char buffer[64]; michael@574: } SHA1_CTX; michael@574: michael@574: +#ifdef HAVE_SYS_CDEFS_H michael@574: #include michael@574: +#else michael@574: +#include "cdefs.h" michael@574: +#endif michael@574: michael@574: __BEGIN_DECLS michael@574: void SHA1Transform(u_int32_t [5], const unsigned char [64]) michael@574: Index: config.h.in michael@574: --- config.h.in.orig 2006-01-17 18:11:44 +0100 michael@574: +++ config.h.in 2006-08-24 12:14:21 +0200 michael@574: @@ -222,6 +222,9 @@ michael@574: /* Define to 1 if you have the `strtoul' function. */ michael@574: #undef HAVE_STRTOUL michael@574: michael@574: +/* Define to 1 if you have the `setenv' function. */ michael@574: +#undef HAVE_SETENV michael@574: + michael@574: /* Define if your system defines struct sockaddr_storage */ michael@574: #undef HAVE_STRUCT_SOCKADDR_STORAGE michael@574: michael@574: @@ -255,6 +258,9 @@ michael@574: /* Define to 1 if you have the header file. */ michael@574: #undef HAVE_SYS_TYPES_H michael@574: michael@574: +/* Define to 1 if you have the header file. */ michael@574: +#undef HAVE_SYS_CDEFS_H michael@574: + michael@574: /* Define to 1 if you have that is POSIX.1 compatible. */ michael@574: #undef HAVE_SYS_WAIT_H michael@574: michael@574: Index: dhcpclient.c michael@574: --- dhcpclient.c.orig 2006-08-19 09:10:41 +0200 michael@574: +++ dhcpclient.c 2006-08-24 12:14:21 +0200 michael@574: @@ -94,6 +94,13 @@ michael@574: michael@574: #define NTRIES 10 michael@574: michael@574: +#ifndef MIN michael@574: +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) michael@574: +#endif /* MIN */ michael@574: +#ifndef MAX michael@574: +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) michael@574: +#endif /* MAX */ michael@574: + michael@574: static int _pack_request(struct dhcpclient_req *, void *, size_t *); michael@574: static int _pack_release(struct dhcpclient_req *, void *, size_t *); michael@574: static int _bcast(struct template *, michael@574: Index: honeyd.c michael@574: --- honeyd.c.orig 2006-08-19 09:14:36 +0200 michael@574: +++ honeyd.c 2006-08-24 12:14:21 +0200 michael@574: @@ -101,6 +101,9 @@ michael@574: #include "histogram.h" michael@574: #include "update.h" michael@574: #include "util.h" michael@574: +#ifndef HAVE_SETENV michael@574: +#include "setenv.h" michael@574: +#endif michael@574: michael@574: #ifdef HAVE_PYTHON michael@574: #include michael@574: Index: honeyd_overload.c michael@574: --- honeyd_overload.c.orig 2006-08-19 09:10:41 +0200 michael@574: +++ honeyd_overload.c 2006-08-24 12:14:21 +0200 michael@574: @@ -295,7 +295,7 @@ michael@574: struct fd *nfd; michael@574: int pair[2]; michael@574: michael@574: - if (socketpair(AF_LOCAL, type, 0, pair) == -1) { michael@574: + if (socketpair(AF_UNIX, type, 0, pair) == -1) { michael@574: warn("%s: socketpair", __func__); michael@574: return (NULL); michael@574: } michael@574: @@ -625,7 +625,7 @@ michael@574: } michael@574: michael@574: /* Get another socketpair */ michael@574: - if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pair) == -1) { michael@574: + if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) { michael@574: DPRINTF((stderr, "%s: socketpair failed", __func__)); michael@574: errno = ETIMEDOUT; /* XXX */ michael@574: return (-1); michael@574: @@ -732,6 +732,7 @@ michael@574: } michael@574: #endif /* !__FreeBSD__ */ michael@574: michael@574: +#ifndef sun michael@574: ssize_t michael@574: recvfrom(int sock, void *buf, size_t len, int flags, struct sockaddr *from, michael@574: socklen_t *fromlen) michael@574: @@ -759,6 +760,7 @@ michael@574: out: michael@574: return (ret); michael@574: } michael@574: +#endif /* !sun */ michael@574: michael@574: ssize_t michael@574: sendto(int sock, const void *buf, size_t len, int flags, michael@574: @@ -795,6 +797,7 @@ michael@574: return (ret); michael@574: } michael@574: michael@574: +#ifndef sun michael@574: int michael@574: getsockname(int sock, struct sockaddr *to, socklen_t *tolen) michael@574: { michael@574: @@ -832,6 +835,7 @@ michael@574: michael@574: return (0); michael@574: } michael@574: +#endif /* !sun */ michael@574: michael@574: ssize_t michael@574: recvmsg(int sock, struct msghdr *msg, int flags) michael@574: @@ -1120,6 +1124,7 @@ michael@574: return (ret); michael@574: } michael@574: michael@574: +#ifndef sun michael@574: int michael@574: accept(int sock, struct sockaddr *addr, socklen_t *addrlen) michael@574: { michael@574: @@ -1169,6 +1174,7 @@ michael@574: michael@574: return (fd); michael@574: } michael@574: +#endif /* !sun */ michael@574: michael@574: #if 0 michael@574: michael@574: Index: personality.c michael@574: --- personality.c.orig 2006-08-19 09:10:40 +0200 michael@574: +++ personality.c 2006-08-24 12:14:21 +0200 michael@574: @@ -32,6 +32,9 @@ michael@574: michael@574: #include michael@574: #include michael@574: +#ifndef UINT_MAX michael@574: +#define UINT_MAX 4294967295U michael@574: +#endif michael@574: michael@574: #include "config.h" michael@574: michael@574: Index: pf_osfp.c michael@574: --- pf_osfp.c.orig 2006-08-19 09:10:40 +0200 michael@574: +++ pf_osfp.c 2006-08-24 12:14:21 +0200 michael@574: @@ -50,6 +50,10 @@ michael@574: # define DPFPRINTF(format, x...) ((void)0) michael@574: # endif /* PFDEBUG */ michael@574: michael@574: +#ifndef MAX michael@574: +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) michael@574: +#endif michael@574: + michael@574: SLIST_HEAD(pf_osfp_list, pf_os_fingerprint) pf_osfp_list; michael@574: pool_t pf_osfp_entry_pl; michael@574: pool_t pf_osfp_pl;