Sat, 01 Sep 2012 18:45:32 +0200
Correct the build configuration when including ncurses(3) and readline(3).
michael@574 | 1 | Index: command.c |
michael@574 | 2 | --- command.c.orig 2006-08-19 09:10:40 +0200 |
michael@574 | 3 | +++ command.c 2006-08-24 12:14:21 +0200 |
michael@574 | 4 | @@ -72,6 +72,9 @@ |
michael@574 | 5 | #include "pyextend.h" |
michael@574 | 6 | #include "honeyd_overload.h" |
michael@574 | 7 | #include "util.h" |
michael@574 | 8 | +#ifndef HAVE_SETENV |
michael@574 | 9 | +#include "setenv.h" |
michael@574 | 10 | +#endif |
michael@574 | 11 | |
michael@574 | 12 | ssize_t atomicio(ssize_t (*)(), int, void *, size_t); |
michael@574 | 13 | |
michael@574 | 14 | Index: compat/getopt.h |
michael@574 | 15 | --- compat/getopt.h.orig 2006-08-19 09:10:40 +0200 |
michael@574 | 16 | +++ compat/getopt.h 2006-08-24 12:14:21 +0200 |
michael@574 | 17 | @@ -40,7 +40,11 @@ |
michael@574 | 18 | #ifndef _GETOPT_H_ |
michael@574 | 19 | #define _GETOPT_H_ |
michael@574 | 20 | |
michael@574 | 21 | +#ifdef HAVE_SYS_CDEFS_H |
michael@574 | 22 | #include <sys/cdefs.h> |
michael@574 | 23 | +#else |
michael@574 | 24 | +#include "cdefs.h" |
michael@574 | 25 | +#endif |
michael@574 | 26 | |
michael@574 | 27 | /* |
michael@574 | 28 | * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions |
michael@574 | 29 | Index: compat/sha1.h |
michael@574 | 30 | --- compat/sha1.h.orig 2006-08-19 09:10:40 +0200 |
michael@574 | 31 | +++ compat/sha1.h 2006-08-24 12:14:21 +0200 |
michael@574 | 32 | @@ -15,7 +15,11 @@ |
michael@574 | 33 | unsigned char buffer[64]; |
michael@574 | 34 | } SHA1_CTX; |
michael@574 | 35 | |
michael@574 | 36 | +#ifdef HAVE_SYS_CDEFS_H |
michael@574 | 37 | #include <sys/cdefs.h> |
michael@574 | 38 | +#else |
michael@574 | 39 | +#include "cdefs.h" |
michael@574 | 40 | +#endif |
michael@574 | 41 | |
michael@574 | 42 | __BEGIN_DECLS |
michael@574 | 43 | void SHA1Transform(u_int32_t [5], const unsigned char [64]) |
michael@574 | 44 | Index: config.h.in |
michael@574 | 45 | --- config.h.in.orig 2006-01-17 18:11:44 +0100 |
michael@574 | 46 | +++ config.h.in 2006-08-24 12:14:21 +0200 |
michael@574 | 47 | @@ -222,6 +222,9 @@ |
michael@574 | 48 | /* Define to 1 if you have the `strtoul' function. */ |
michael@574 | 49 | #undef HAVE_STRTOUL |
michael@574 | 50 | |
michael@574 | 51 | +/* Define to 1 if you have the `setenv' function. */ |
michael@574 | 52 | +#undef HAVE_SETENV |
michael@574 | 53 | + |
michael@574 | 54 | /* Define if your system defines struct sockaddr_storage */ |
michael@574 | 55 | #undef HAVE_STRUCT_SOCKADDR_STORAGE |
michael@574 | 56 | |
michael@574 | 57 | @@ -255,6 +258,9 @@ |
michael@574 | 58 | /* Define to 1 if you have the <sys/types.h> header file. */ |
michael@574 | 59 | #undef HAVE_SYS_TYPES_H |
michael@574 | 60 | |
michael@574 | 61 | +/* Define to 1 if you have the <sys/cdefs.h> header file. */ |
michael@574 | 62 | +#undef HAVE_SYS_CDEFS_H |
michael@574 | 63 | + |
michael@574 | 64 | /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ |
michael@574 | 65 | #undef HAVE_SYS_WAIT_H |
michael@574 | 66 | |
michael@574 | 67 | Index: dhcpclient.c |
michael@574 | 68 | --- dhcpclient.c.orig 2006-08-19 09:10:41 +0200 |
michael@574 | 69 | +++ dhcpclient.c 2006-08-24 12:14:21 +0200 |
michael@574 | 70 | @@ -94,6 +94,13 @@ |
michael@574 | 71 | |
michael@574 | 72 | #define NTRIES 10 |
michael@574 | 73 | |
michael@574 | 74 | +#ifndef MIN |
michael@574 | 75 | +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) |
michael@574 | 76 | +#endif /* MIN */ |
michael@574 | 77 | +#ifndef MAX |
michael@574 | 78 | +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) |
michael@574 | 79 | +#endif /* MAX */ |
michael@574 | 80 | + |
michael@574 | 81 | static int _pack_request(struct dhcpclient_req *, void *, size_t *); |
michael@574 | 82 | static int _pack_release(struct dhcpclient_req *, void *, size_t *); |
michael@574 | 83 | static int _bcast(struct template *, |
michael@574 | 84 | Index: honeyd.c |
michael@574 | 85 | --- honeyd.c.orig 2006-08-19 09:14:36 +0200 |
michael@574 | 86 | +++ honeyd.c 2006-08-24 12:14:21 +0200 |
michael@574 | 87 | @@ -101,6 +101,9 @@ |
michael@574 | 88 | #include "histogram.h" |
michael@574 | 89 | #include "update.h" |
michael@574 | 90 | #include "util.h" |
michael@574 | 91 | +#ifndef HAVE_SETENV |
michael@574 | 92 | +#include "setenv.h" |
michael@574 | 93 | +#endif |
michael@574 | 94 | |
michael@574 | 95 | #ifdef HAVE_PYTHON |
michael@574 | 96 | #include <Python.h> |
michael@574 | 97 | Index: honeyd_overload.c |
michael@574 | 98 | --- honeyd_overload.c.orig 2006-08-19 09:10:41 +0200 |
michael@574 | 99 | +++ honeyd_overload.c 2006-08-24 12:14:21 +0200 |
michael@574 | 100 | @@ -295,7 +295,7 @@ |
michael@574 | 101 | struct fd *nfd; |
michael@574 | 102 | int pair[2]; |
michael@574 | 103 | |
michael@574 | 104 | - if (socketpair(AF_LOCAL, type, 0, pair) == -1) { |
michael@574 | 105 | + if (socketpair(AF_UNIX, type, 0, pair) == -1) { |
michael@574 | 106 | warn("%s: socketpair", __func__); |
michael@574 | 107 | return (NULL); |
michael@574 | 108 | } |
michael@574 | 109 | @@ -625,7 +625,7 @@ |
michael@574 | 110 | } |
michael@574 | 111 | |
michael@574 | 112 | /* Get another socketpair */ |
michael@574 | 113 | - if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pair) == -1) { |
michael@574 | 114 | + if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) { |
michael@574 | 115 | DPRINTF((stderr, "%s: socketpair failed", __func__)); |
michael@574 | 116 | errno = ETIMEDOUT; /* XXX */ |
michael@574 | 117 | return (-1); |
michael@574 | 118 | @@ -732,6 +732,7 @@ |
michael@574 | 119 | } |
michael@574 | 120 | #endif /* !__FreeBSD__ */ |
michael@574 | 121 | |
michael@574 | 122 | +#ifndef sun |
michael@574 | 123 | ssize_t |
michael@574 | 124 | recvfrom(int sock, void *buf, size_t len, int flags, struct sockaddr *from, |
michael@574 | 125 | socklen_t *fromlen) |
michael@574 | 126 | @@ -759,6 +760,7 @@ |
michael@574 | 127 | out: |
michael@574 | 128 | return (ret); |
michael@574 | 129 | } |
michael@574 | 130 | +#endif /* !sun */ |
michael@574 | 131 | |
michael@574 | 132 | ssize_t |
michael@574 | 133 | sendto(int sock, const void *buf, size_t len, int flags, |
michael@574 | 134 | @@ -795,6 +797,7 @@ |
michael@574 | 135 | return (ret); |
michael@574 | 136 | } |
michael@574 | 137 | |
michael@574 | 138 | +#ifndef sun |
michael@574 | 139 | int |
michael@574 | 140 | getsockname(int sock, struct sockaddr *to, socklen_t *tolen) |
michael@574 | 141 | { |
michael@574 | 142 | @@ -832,6 +835,7 @@ |
michael@574 | 143 | |
michael@574 | 144 | return (0); |
michael@574 | 145 | } |
michael@574 | 146 | +#endif /* !sun */ |
michael@574 | 147 | |
michael@574 | 148 | ssize_t |
michael@574 | 149 | recvmsg(int sock, struct msghdr *msg, int flags) |
michael@574 | 150 | @@ -1120,6 +1124,7 @@ |
michael@574 | 151 | return (ret); |
michael@574 | 152 | } |
michael@574 | 153 | |
michael@574 | 154 | +#ifndef sun |
michael@574 | 155 | int |
michael@574 | 156 | accept(int sock, struct sockaddr *addr, socklen_t *addrlen) |
michael@574 | 157 | { |
michael@574 | 158 | @@ -1169,6 +1174,7 @@ |
michael@574 | 159 | |
michael@574 | 160 | return (fd); |
michael@574 | 161 | } |
michael@574 | 162 | +#endif /* !sun */ |
michael@574 | 163 | |
michael@574 | 164 | #if 0 |
michael@574 | 165 | |
michael@574 | 166 | Index: personality.c |
michael@574 | 167 | --- personality.c.orig 2006-08-19 09:10:40 +0200 |
michael@574 | 168 | +++ personality.c 2006-08-24 12:14:21 +0200 |
michael@574 | 169 | @@ -32,6 +32,9 @@ |
michael@574 | 170 | |
michael@574 | 171 | #include <sys/param.h> |
michael@574 | 172 | #include <sys/types.h> |
michael@574 | 173 | +#ifndef UINT_MAX |
michael@574 | 174 | +#define UINT_MAX 4294967295U |
michael@574 | 175 | +#endif |
michael@574 | 176 | |
michael@574 | 177 | #include "config.h" |
michael@574 | 178 | |
michael@574 | 179 | Index: pf_osfp.c |
michael@574 | 180 | --- pf_osfp.c.orig 2006-08-19 09:10:40 +0200 |
michael@574 | 181 | +++ pf_osfp.c 2006-08-24 12:14:21 +0200 |
michael@574 | 182 | @@ -50,6 +50,10 @@ |
michael@574 | 183 | # define DPFPRINTF(format, x...) ((void)0) |
michael@574 | 184 | # endif /* PFDEBUG */ |
michael@574 | 185 | |
michael@574 | 186 | +#ifndef MAX |
michael@574 | 187 | +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) |
michael@574 | 188 | +#endif |
michael@574 | 189 | + |
michael@574 | 190 | SLIST_HEAD(pf_osfp_list, pf_os_fingerprint) pf_osfp_list; |
michael@574 | 191 | pool_t pf_osfp_entry_pl; |
michael@574 | 192 | pool_t pf_osfp_pl; |