summaryrefslogtreecommitdiff
path: root/net-misc/netkit-bootpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/netkit-bootpd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/netkit-bootpd')
-rw-r--r--net-misc/netkit-bootpd/Manifest6
-rw-r--r--net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch701
-rw-r--r--net-misc/netkit-bootpd/metadata.xml8
-rw-r--r--net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild38
4 files changed, 753 insertions, 0 deletions
diff --git a/net-misc/netkit-bootpd/Manifest b/net-misc/netkit-bootpd/Manifest
new file mode 100644
index 000000000000..d8155bbfa341
--- /dev/null
+++ b/net-misc/netkit-bootpd/Manifest
@@ -0,0 +1,6 @@
+AUX netkit-bootpd-2.4.patch 19727 SHA256 f29376488e650d328c02aec3eb42a22a11d7f24e37906fe6c5f2ac1048b7a07a SHA512 251fb2652c808bbfc18d4d1cdbe746aa3f52f09a53e3c09de426ab94ea6b016d6861e88f45f2cb0740fb5be3a76b6156a772f27d17221eb9f792ab3454c3282d WHIRLPOOL 71162b1f9476913f9fcc7c91450700e4cb8ec7287f4a498d1dd617d0700db3926488e974bd8a532a02b6c127e1ef8bbedb865ee99efcc087a07b0db02d2f4913
+DIST bootpd-2.4.tar.gz 99765 SHA256 13edffae98fd92d99e23b19456b0199d9496fd2121c1325c762bccd23f586682 SHA512 aaed30b724c660973e2efac8c18ead48caf1e8e5e35d4af6c6476080c32f8ce8c8722fd1c18d864e557301d37615cbb313e2ab0140da8963fbd23d5000e60379 WHIRLPOOL 41ef2aee15a1229d5061484b7024c99493508a063f578e7ad49aea953c449c7f88afa99a28814b183a23ed7f98c28bec3d569d4cf0c9c7868d2541fc77573b15
+EBUILD netkit-bootpd-2.4-r1.ebuild 745 SHA256 7bb157de3e8bef510b163c17558d7a6caf9ad39f9b175046cfee2a3935a028b7 SHA512 33482a2d68c91b0bfca2d397083921bf83dbf6e71f6da59ad04c3ade91943ced4488650ad7991f55a0913a6a58ce4c9793f0da9ff48d2c78837021863f4b9d19 WHIRLPOOL 2340c7f136fb6fd10035b80c59031e97ac91027dc71f29ca5f8876cf675317a2b2085424a58adcb91b698019b51c01fa41f085077b6b9c13b63e1531cff0e099
+MISC ChangeLog 2267 SHA256 435da188ba36effc7898a62ca8513a288b9fbed98f11ae3c7b411e71809581d6 SHA512 5646be97fda2e20b9cad3494996978b66d0c9853722feb6ae7354379a2cf9ee5c8eacf89755ad5ca95162376fca1558b7c86a9e7b71314dbabb8f184df77ccfd WHIRLPOOL 4df52729be47f89ccaaac3bc800234f43cde45994a5e4fcd95068232c308d173bc21f3b52baff7580b0a479036bf0ac452440e825174560f594a8e8120ded93a
+MISC ChangeLog-2015 3370 SHA256 1c0971dc74e6a0791b494645d03d82ff94382d8312aa9b95d12562dffcfd7ff5 SHA512 f229216352ba60e4781c999b601c7328602852f40a89aae95d2118e064b4515d0c8726ec664b4fb4e0dbe19deed7e123524b9da35a3253bc53bd9a8b62dc3332 WHIRLPOOL 9a14a8aed77b501854928f39d42a1e58ce4fb55123562541f5db0b1eb5aaabac5daca955db556df1a1345f954b6167d0d294f5c9fe7f6add22567ba990d15c78
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch b/net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch
new file mode 100644
index 000000000000..1daf765a95e1
--- /dev/null
+++ b/net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch
@@ -0,0 +1,701 @@
+diff -ur bootpd-2.4.orig/bootpd.c bootpd-2.4/bootpd.c
+--- bootpd-2.4.orig/bootpd.c 1995-02-19 17:53:02.000000000 +0200
++++ bootpd-2.4/bootpd.c 2010-07-07 14:55:03.000000000 +0300
+@@ -117,14 +117,14 @@
+ extern void dumptab P((char *));
+
+ PRIVATE void catcher P((int));
+-PRIVATE int chk_access P((char *, int32 *));
++PRIVATE int chk_access P((char *, int32_t *));
+ #ifdef VEND_CMU
+ PRIVATE void dovend_cmu P((struct bootp *, struct host *));
+ #endif
+-PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32));
++PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32_t));
+ PRIVATE void handle_reply P((void));
+ PRIVATE void handle_request P((void));
+-PRIVATE void sendreply P((int forward, int32 dest_override));
++PRIVATE void sendreply P((int forward, int32_t dest_override));
+ PRIVATE void usage P((void));
+
+ #undef P
+@@ -185,7 +185,7 @@
+ * main server loop is started.
+ */
+
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -339,7 +339,7 @@
+ "%s: invalid timeout specification\n", progname);
+ break;
+ }
+- actualtimeout.tv_sec = (int32) (60 * n);
++ actualtimeout.tv_sec = (int32_t) (60 * n);
+ /*
+ * If the actual timeout is zero, pass a NULL pointer
+ * to select so it blocks indefinitely, otherwise,
+@@ -559,9 +559,9 @@
+ break;
+ }
+ }
++ return(0);
+ }
+
+-
+
+
+ /*
+@@ -616,9 +616,9 @@
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct host *hp = NULL;
+ struct host dummyhost;
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ char realpath[1024] = {""};
+ char *clntpath;
+ char *homedir, *bootfile;
+@@ -726,7 +726,7 @@
+ * with a timestamp lower than the threshold.
+ */
+ if (hp->flags.min_wait) {
+- u_int32 t = (u_int32) ntohs(bp->bp_secs);
++ uint32_t t = (uint32_t) ntohs(bp->bp_secs);
+ if (t < hp->min_wait) {
+ if (debug > 1)
+ report(LOG_INFO,
+@@ -997,7 +997,7 @@
+ PRIVATE void
+ sendreply(forward, dst_override)
+ int forward;
+- int32 dst_override;
++ int32_t dst_override;
+ {
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct in_addr dst;
+@@ -1110,12 +1110,12 @@
+ PRIVATE int
+ chk_access(path, filesize)
+ char *path;
+- int32 *filesize;
++ int32_t *filesize;
+ {
+ struct stat st;
+
+ if ((stat(path, &st) == 0) && (st.st_mode & (S_IREAD >> 6))) {
+- *filesize = (int32) st.st_size;
++ *filesize = (int32_t) st.st_size;
+ return 0;
+ } else {
+ return -1;
+@@ -1211,7 +1211,7 @@
+ dovend_rfc1048(bp, hp, bootsize)
+ struct bootp *bp;
+ struct host *hp;
+- int32 bootsize;
++ int32_t bootsize;
+ {
+ int bytesleft, len;
+ byte *vp;
+diff -ur bootpd-2.4.orig/bootpd.c-org bootpd-2.4/bootpd.c-org
+--- bootpd-2.4.orig/bootpd.c-org 1994-11-27 15:36:21.000000000 +0200
++++ bootpd-2.4/bootpd.c-org 2010-07-07 14:55:03.000000000 +0300
+@@ -117,14 +117,14 @@
+ extern void dumptab P((char *));
+
+ PRIVATE void catcher P((int));
+-PRIVATE int chk_access P((char *, int32 *));
++PRIVATE int chk_access P((char *, int32_t *));
+ #ifdef VEND_CMU
+ PRIVATE void dovend_cmu P((struct bootp *, struct host *));
+ #endif
+-PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32));
++PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32_t));
+ PRIVATE void handle_reply P((void));
+ PRIVATE void handle_request P((void));
+-PRIVATE void sendreply P((int forward, int32 dest_override));
++PRIVATE void sendreply P((int forward, int32_t dest_override));
+ PRIVATE void usage P((void));
+
+ #undef P
+@@ -339,7 +339,7 @@
+ "%s: invalid timeout specification\n", progname);
+ break;
+ }
+- actualtimeout.tv_sec = (int32) (60 * n);
++ actualtimeout.tv_sec = (int32_t) (60 * n);
+ /*
+ * If the actual timeout is zero, pass a NULL pointer
+ * to select so it blocks indefinitely, otherwise,
+@@ -606,9 +606,9 @@
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct host *hp = NULL;
+ struct host dummyhost;
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ char realpath[1024];
+ char *clntpath;
+ char *homedir, *bootfile;
+@@ -716,7 +716,7 @@
+ * with a timestamp lower than the threshold.
+ */
+ if (hp->flags.min_wait) {
+- u_int32 t = (u_int32) ntohs(bp->bp_secs);
++ uint32_t t = (uint32_t) ntohs(bp->bp_secs);
+ if (t < hp->min_wait) {
+ if (debug > 1)
+ report(LOG_INFO,
+@@ -987,7 +987,7 @@
+ PRIVATE void
+ sendreply(forward, dst_override)
+ int forward;
+- int32 dst_override;
++ int32_t dst_override;
+ {
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct in_addr dst;
+@@ -1100,12 +1100,12 @@
+ PRIVATE int
+ chk_access(path, filesize)
+ char *path;
+- int32 *filesize;
++ int32_t *filesize;
+ {
+ struct stat st;
+
+ if ((stat(path, &st) == 0) && (st.st_mode & (S_IREAD >> 6))) {
+- *filesize = (int32) st.st_size;
++ *filesize = (int32_t) st.st_size;
+ return 0;
+ } else {
+ return -1;
+@@ -1201,7 +1201,7 @@
+ dovend_rfc1048(bp, hp, bootsize)
+ struct bootp *bp;
+ struct host *hp;
+- int32 bootsize;
++ int32_t bootsize;
+ {
+ int bytesleft, len;
+ byte *vp;
+diff -ur bootpd-2.4.orig/bootpd.h bootpd-2.4/bootpd.h
+--- bootpd-2.4.orig/bootpd.h 1994-11-27 15:36:13.000000000 +0200
++++ bootpd-2.4/bootpd.h 2010-07-07 14:55:03.000000000 +0300
+@@ -180,8 +180,8 @@
+ htype, /* RFC826 says this should be 16-bits but
+ RFC951 only allocates 1 byte. . . */
+ haddr[MAXHADDRLEN];
+- int32 time_offset;
+- unsigned int32 bootsize,
++ int32_t time_offset;
++ uint32_t bootsize,
+ msg_size,
+ min_wait;
+ struct in_addr bootserver,
+diff -ur bootpd-2.4.orig/Bootpd-linux.diffs bootpd-2.4/Bootpd-linux.diffs
+--- bootpd-2.4.orig/Bootpd-linux.diffs 1995-02-28 02:14:29.000000000 +0200
++++ bootpd-2.4/Bootpd-linux.diffs 2010-07-07 14:55:03.000000000 +0300
+@@ -21,17 +21,17 @@
+ --- 494,499 ----
+ ***************
+ *** 619,625 ****
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ ! char realpath[1024] = {""};
+ char *clntpath;
+ char *homedir, *bootfile;
+ int n;
+ --- 609,615 ----
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ ! char realpath[1024];
+ char *clntpath;
+ char *homedir, *bootfile;
+diff -ur bootpd-2.4.orig/bootpef.c bootpd-2.4/bootpef.c
+--- bootpd-2.4.orig/bootpef.c 1994-11-27 15:36:13.000000000 +0200
++++ bootpd-2.4/bootpef.c 2010-07-07 14:55:03.000000000 +0300
+@@ -97,7 +97,7 @@
+ #define P(args) ()
+ #endif
+
+-static void dovend_rfc1048 P((struct bootp *, struct host *, int32));
++static void dovend_rfc1048 P((struct bootp *, struct host *, int32_t));
+ static void mktagfile P((struct host *));
+ static void usage P((void));
+
+@@ -139,7 +139,7 @@
+ * Initialization such as command-line processing is done and then the
+ * main server loop is started.
+ */
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -275,6 +275,7 @@
+ mktagfile(hp);
+ hp = (struct host *) hash_NextEntry(nmhashtable);
+ }
++ return(0);
+ }
+
+
+diff -ur bootpd-2.4.orig/bootpgw.c bootpd-2.4/bootpgw.c
+--- bootpd-2.4.orig/bootpgw.c 1994-11-27 15:36:21.000000000 +0200
++++ bootpd-2.4/bootpgw.c 2010-07-07 14:55:03.000000000 +0300
+@@ -139,7 +139,7 @@
+ int pktlen;
+ char *progname;
+ char *servername;
+-int32 server_ipa; /* Real server IP address, network order. */
++int32_t server_ipa; /* Real server IP address, network order. */
+
+ char myhostname[64];
+ struct in_addr my_ip_addr;
+@@ -152,7 +152,7 @@
+ * main server loop is started.
+ */
+
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -298,7 +298,7 @@
+ "%s: invalid timeout specification\n", progname);
+ break;
+ }
+- actualtimeout.tv_sec = (int32) (60 * n);
++ actualtimeout.tv_sec = (int32_t) (60 * n);
+ /*
+ * If the actual timeout is zero, pass a NULL pointer
+ * to select so it blocks indefinitely, otherwise,
+@@ -481,6 +481,7 @@
+ break;
+ }
+ }
++ return(0);
+ }
+
+
+diff -ur bootpd-2.4.orig/bootp.h bootpd-2.4/bootp.h
+--- bootpd-2.4.orig/bootp.h 1994-11-27 15:36:13.000000000 +0200
++++ bootpd-2.4/bootp.h 2010-07-07 14:55:03.000000000 +0300
+@@ -31,7 +31,7 @@
+ *
+ */
+
+-#include "bptypes.h" /* for int32, u_int32 */
++#include "bptypes.h" /* for int32_t, uint32_t */
+
+ #define BP_CHADDR_LEN 16
+ #define BP_SNAME_LEN 64
+@@ -44,7 +44,7 @@
+ unsigned char bp_htype; /* hardware addr type */
+ unsigned char bp_hlen; /* hardware addr length */
+ unsigned char bp_hops; /* gateway hops */
+- unsigned int32 bp_xid; /* transaction ID */
++ uint32_t bp_xid; /* transaction ID */
+ unsigned short bp_secs; /* seconds since boot began */
+ unsigned short bp_flags; /* RFC1532 broadcast, etc. */
+ struct in_addr bp_ciaddr; /* client IP address */
+@@ -133,13 +133,13 @@
+
+ struct cmu_vend {
+ char v_magic[4]; /* magic number */
+- unsigned int32 v_flags; /* flags/opcodes, etc. */
++ uint32_t v_flags; /* flags/opcodes, etc. */
+ struct in_addr v_smask; /* Subnet mask */
+ struct in_addr v_dgate; /* Default gateway */
+ struct in_addr v_dns1, v_dns2; /* Domain name servers */
+ struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */
+ struct in_addr v_ts1, v_ts2; /* Time servers */
+- int32 v_unused[6]; /* currently unused */
++ int32_t v_unused[6]; /* currently unused */
+ };
+
+
+diff -ur bootpd-2.4.orig/bootptest.c bootpd-2.4/bootptest.c
+--- bootpd-2.4.orig/bootptest.c 1994-11-27 15:36:19.000000000 +0200
++++ bootpd-2.4/bootptest.c 2010-07-07 14:55:03.000000000 +0300
+@@ -125,12 +125,12 @@
+ char *servername = NULL;
+ char *vendor_file = NULL;
+ char *bp_file = NULL;
+- int32 server_addr; /* inet addr, network order */
++ int32_t server_addr; /* inet addr, network order */
+ int s; /* Socket file descriptor */
+ int n, tolen, fromlen, recvcnt;
+ int use_hwa = 0;
+- int32 vend_magic;
+- int32 xid;
++ int32_t vend_magic;
++ int32_t xid;
+
+ progname = strrchr(argv[0], '/');
+ if (progname)
+@@ -286,8 +286,8 @@
+ bp = (struct bootp *) sndbuf;
+ bzero(bp, sizeof(*bp));
+ bp->bp_op = BOOTREQUEST;
+- xid = (int32) getpid();
+- bp->bp_xid = (u_int32) htonl(xid);
++ xid = (int32_t) getpid();
++ bp->bp_xid = (uint32_t) htonl(xid);
+ if (bp_file)
+ strncpy(bp->bp_file, bp_file, BP_FILE_LEN);
+
+diff -ur bootpd-2.4.orig/bptypes.h bootpd-2.4/bptypes.h
+--- bootpd-2.4.orig/bptypes.h 1994-11-27 15:36:14.000000000 +0200
++++ bootpd-2.4/bptypes.h 2010-07-07 14:55:03.000000000 +0300
+@@ -1,18 +1,10 @@
+ /* bptypes.h */
++#include <sys/types.h>
+
+ #ifndef BPTYPES_H
+ #define BPTYPES_H
+
+ /*
+- * 32 bit integers are different types on various architectures
+- */
+-
+-#ifndef int32
+-#define int32 long
+-#endif
+-typedef unsigned int32 u_int32;
+-
+-/*
+ * Nice typedefs. . .
+ */
+
+diff -ur bootpd-2.4.orig/dovend.c bootpd-2.4/dovend.c
+--- bootpd-2.4.orig/dovend.c 1994-11-27 15:36:19.000000000 +0200
++++ bootpd-2.4/dovend.c 2010-07-07 14:55:03.000000000 +0300
+@@ -385,7 +385,7 @@
+
+ void
+ insert_u_long(value, dest)
+- u_int32 value;
++ uint32_t value;
+ byte **dest;
+ {
+ byte *temp;
+diff -ur bootpd-2.4.orig/dovend.h bootpd-2.4/dovend.h
+--- bootpd-2.4.orig/dovend.h 1994-11-27 15:36:14.000000000 +0200
++++ bootpd-2.4/dovend.h 2010-07-07 14:55:03.000000000 +0300
+@@ -8,6 +8,6 @@
+
+ extern int dovend_rfc1497 P((struct host *hp, u_char *buf, int len));
+ extern int insert_ip P((int, struct in_addr_list *, u_char **, int *));
+-extern void insert_u_long P((u_int32, u_char **));
++extern void insert_u_long P((uint32_t, u_char **));
+
+ #undef P
+diff -ur bootpd-2.4.orig/getether.c bootpd-2.4/getether.c
+--- bootpd-2.4.orig/getether.c 1994-11-27 15:36:20.000000000 +0200
++++ bootpd-2.4/getether.c 2010-07-07 14:58:09.000000000 +0300
+@@ -14,6 +14,8 @@
+ #include <ctype.h>
+ #include <syslog.h>
+
++#include <string.h> /* bzero and strcpy */
++
+ #include "report.h"
+ #define EALEN 6
+
+@@ -340,7 +342,7 @@
+ if (ioctl(fd, SIOCGIFHWADDR, &phys) < 0) {
+ report(LOG_ERR, "getether: ioctl SIOCGIFHWADDR failed");
+ } else {
+- bcopy(phys.ifr_hwaddr, eap, EALEN);
++ bcopy(&phys.ifr_hwaddr, eap, EALEN);
+ rc = 0;
+ }
+ close(fd);
+diff -ur bootpd-2.4.orig/lookup.c bootpd-2.4/lookup.c
+--- bootpd-2.4.orig/lookup.c 1994-11-27 15:36:15.000000000 +0200
++++ bootpd-2.4/lookup.c 2010-07-07 14:55:03.000000000 +0300
+@@ -69,7 +69,7 @@
+ int
+ lookup_ipa(hostname, result)
+ char *hostname;
+- u_int32 *result;
++ uint32_t *result;
+ {
+ struct hostent *hp;
+ hp = gethostbyname(hostname);
+@@ -90,10 +90,10 @@
+ */
+ int
+ lookup_netmask(addr, result)
+- u_int32 addr; /* both in network order */
+- u_int32 *result;
++ uint32_t addr; /* both in network order */
++ uint32_t *result;
+ {
+- int32 m, a;
++ int32_t m, a;
+
+ a = ntohl(addr);
+ m = 0;
+diff -ur bootpd-2.4.orig/lookup.h bootpd-2.4/lookup.h
+--- bootpd-2.4.orig/lookup.h 1994-11-27 15:36:15.000000000 +0200
++++ bootpd-2.4/lookup.h 2010-07-07 14:55:03.000000000 +0300
+@@ -1,6 +1,6 @@
+ /* lookup.h */
+
+-#include "bptypes.h" /* for int32, u_int32 */
++#include "bptypes.h" /* for int32_t, uint32_t */
+
+ #ifdef __STDC__
+ #define P(args) args
+@@ -9,7 +9,7 @@
+ #endif
+
+ extern u_char *lookup_hwa P((char *hostname, int htype));
+-extern int lookup_ipa P((char *hostname, u_int32 *addr));
+-extern int lookup_netmask P((u_int32 addr, u_int32 *mask));
++extern int lookup_ipa P((char *hostname, uint32_t *addr));
++extern int lookup_netmask P((uint32_t addr, uint32_t *mask));
+
+ #undef P
+diff -ur bootpd-2.4.orig/Makefile bootpd-2.4/Makefile
+--- bootpd-2.4.orig/Makefile 1995-02-28 12:59:19.000000000 +0200
++++ bootpd-2.4/Makefile 2010-07-07 14:57:07.000000000 +0300
+@@ -40,7 +40,7 @@
+ BINDIR=/usr/etc
+ MANDIR=/usr/local/man
+
+-CFLAGS= $(OPTDEFS) $(SYSDEFS) $(FILEDEFS) $(MOREDEFS)
++CFLAGS+= $(OPTDEFS) $(SYSDEFS) $(FILEDEFS) $(MOREDEFS)
+ PROGS= bootpd bootpef bootpgw bootptest
+ TESTS= trylook trygetif trygetea
+
+@@ -86,7 +86,7 @@
+
+ # DEC/OSF1 on the Alpha
+ alpha:
+- $(MAKE) SYSDEFS="-DETC_ETHERS -Dint32=int -D_SOCKADDR_LEN" \
++ $(MAKE) SYSDEFS="-DETC_ETHERS -Dint32_t=int -D_SOCKADDR_LEN" \
+ STRERROR=strerror.o
+
+ # Control Data EP/IX 1.4.3 system, BSD 4.3 mode
+@@ -124,7 +124,7 @@
+ # Linux
+ ###
+ linux:
+- $(MAKE) CC="gcc -O2" \
++ $(MAKE) CC="${CC}" \
+ SYSDEFS="-Dlinux" \
+ SYSLIBS="" \
+ LOG_FACILITY="-DLOG_BOOTP=LOG_LOCAL2" \
+@@ -143,36 +143,36 @@
+ OBJ_D= bootpd.o dovend.o readfile.o hash.o dumptab.o \
+ lookup.o getif.o hwaddr.o tzone.o report.o $(STRERROR)
+ bootpd: $(OBJ_D)
+- $(CC) -o $@ $(OBJ_D) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_D) $(SYSLIBS)
+
+ OBJ_EF= bootpef.o dovend.o readfile.o hash.o dumptab.o \
+ lookup.o hwaddr.o tzone.o report.o $(STRERROR)
+ bootpef: $(OBJ_EF)
+- $(CC) -o $@ $(OBJ_EF) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_EF) $(SYSLIBS)
+
+ OBJ_GW= bootpgw.o getif.o hwaddr.o report.o $(STRERROR)
+ bootpgw: $(OBJ_GW)
+- $(CC) -o $@ $(OBJ_GW) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_GW) $(SYSLIBS)
+
+ OBJ_TEST= bootptest.o print-bootp.o getif.o getether.o \
+ report.o $(STRERROR)
+ bootptest: $(OBJ_TEST)
+- $(CC) -o $@ $(OBJ_TEST) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_TEST) $(SYSLIBS)
+
+ # This is just for testing the lookup functions.
+ TRYLOOK= trylook.o lookup.o report.o $(STRERROR)
+ trylook : $(TRYLOOK)
+- $(CC) -o $@ $(TRYLOOK) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(TRYLOOK) $(SYSLIBS)
+
+ # This is just for testing getif.
+ TRYGETIF= trygetif.o getif.o report.o $(STRERROR)
+ trygetif : $(TRYGETIF)
+- $(CC) -o $@ $(TRYGETIF) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(TRYGETIF) $(SYSLIBS)
+
+ # This is just for testing getether.
+ TRYGETEA= trygetea.o getether.o report.o $(STRERROR)
+ trygetea : $(TRYGETEA)
+- $(CC) -o $@ $(TRYGETEA) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(TRYGETEA) $(SYSLIBS)
+
+ # This rule just keeps the LOG_BOOTP define localized.
+ report.o : report.c
+diff -ur bootpd-2.4.orig/print-bootp.c bootpd-2.4/print-bootp.c
+--- bootpd-2.4.orig/print-bootp.c 1994-11-27 15:36:21.000000000 +0200
++++ bootpd-2.4/print-bootp.c 2010-07-07 14:55:03.000000000 +0300
+@@ -170,9 +170,9 @@
+
+ TCHECK(bp->bp_vend[0], vdlen);
+ printf(" vend");
+- if (!bcmp(bp->bp_vend, vm_rfc1048, sizeof(u_int32)))
++ if (!bcmp(bp->bp_vend, vm_rfc1048, sizeof(uint32_t)))
+ rfc1048_print(bp->bp_vend, vdlen);
+- else if (!bcmp(bp->bp_vend, vm_cmu, sizeof(u_int32)))
++ else if (!bcmp(bp->bp_vend, vm_cmu, sizeof(uint32_t)))
+ cmu_print(bp->bp_vend, vdlen);
+ else
+ other_print(bp->bp_vend, vdlen);
+@@ -192,7 +192,7 @@
+ * a: ASCII
+ * b: byte (8-bit)
+ * i: inet address
+- * l: int32
++ * l: int32_t
+ * s: short (16-bit)
+ */
+ char *
+@@ -281,7 +281,7 @@
+ u_char tag;
+ u_char *ep;
+ register int len, j;
+- u_int32 ul;
++ uint32_t ul;
+ u_short us;
+ struct in_addr ia;
+ char *optstr;
+@@ -289,7 +289,7 @@
+ printf("-rfc1395");
+
+ /* Step over magic cookie */
+- bp += sizeof(int32);
++ bp += sizeof(int32_t);
+ /* Setup end pointer */
+ ep = bp + length;
+ while (bp < ep) {
+diff -ur bootpd-2.4.orig/readfile.c bootpd-2.4/readfile.c
+--- bootpd-2.4.orig/readfile.c 1994-11-27 15:36:22.000000000 +0200
++++ bootpd-2.4/readfile.c 2010-07-07 14:55:03.000000000 +0300
+@@ -149,7 +149,7 @@
+
+ PRIVATE int nhosts; /* Number of hosts (/w hw or IP address) */
+ PRIVATE int nentries; /* Total number of entries */
+-PRIVATE int32 modtime = 0; /* Last modification time of bootptab */
++PRIVATE int32_t modtime = 0; /* Last modification time of bootptab */
+ PRIVATE char *current_hostname; /* Name of the current entry. */
+ PRIVATE char current_tagname[8];
+
+@@ -260,7 +260,7 @@
+ get_shared_string P((char **));
+ PRIVATE char *
+ get_string P((char **, char *, u_int *));
+-PRIVATE u_int32
++PRIVATE uint32_t
+ get_u_long P((char **));
+ PRIVATE boolean
+ goodname P((char *));
+@@ -279,7 +279,7 @@
+ PRIVATE byte *
+ prs_haddr P((char **, u_int));
+ PRIVATE int
+- prs_inetaddr P((char **, u_int32 *));
++ prs_inetaddr P((char **, uint32_t *));
+ PRIVATE void
+ read_entry P((FILE *, char *, u_int *));
+ PRIVATE char *
+@@ -415,7 +415,7 @@
+ */
+ if (goodname(hp->hostname->string)) {
+ char *hn = hp->hostname->string;
+- u_int32 value;
++ uint32_t value;
+ if (hp->flags.iaddr == 0) {
+ if (lookup_ipa(hn, &value)) {
+ report(LOG_ERR, "can not get IP addr for %s", hn);
+@@ -798,8 +798,8 @@
+ byte *tmphaddr;
+ struct shared_string *ss;
+ struct symbolmap *symbolptr;
+- u_int32 value;
+- int32 timeoff;
++ uint32_t value;
++ int32_t timeoff;
+ int i, numsymbols;
+ unsigned len;
+ int optype; /* Indicates boolean, addition, or deletion */
+@@ -1674,11 +1674,11 @@
+ PRIVATE int
+ prs_inetaddr(src, result)
+ char **src;
+- u_int32 *result;
++ uint32_t *result;
+ {
+ char tmpstr[MAXSTRINGLEN];
+- register u_int32 value;
+- u_int32 parts[4], *pp;
++ register uint32_t value;
++ uint32_t parts[4], *pp;
+ int n;
+ char *s, *t;
+
+@@ -1862,11 +1862,11 @@
+ * point to the first illegal character.
+ */
+
+-PRIVATE u_int32
++PRIVATE uint32_t
+ get_u_long(src)
+ char **src;
+ {
+- register u_int32 value, base;
++ register uint32_t value, base;
+ char c;
+
+ /*
+diff -ur bootpd-2.4.orig/report.c bootpd-2.4/report.c
+--- bootpd-2.4.orig/report.c 1994-11-27 15:36:16.000000000 +0200
++++ bootpd-2.4/report.c 2010-07-07 14:55:03.000000000 +0300
+@@ -10,6 +10,7 @@
+
+ #include <stdio.h>
+ #include <syslog.h>
++#include <errno.h>
+
+ #include "report.h"
+
+diff -ur bootpd-2.4.orig/tzone.c bootpd-2.4/tzone.c
+--- bootpd-2.4.orig/tzone.c 1994-11-27 15:36:17.000000000 +0200
++++ bootpd-2.4/tzone.c 2010-07-07 14:55:03.000000000 +0300
+@@ -19,7 +19,7 @@
+ #include "tzone.h"
+
+ /* This is what other modules use. */
+-int32 secondswest;
++int32_t secondswest;
+
+ /*
+ * Get our timezone offset so we can give it to clients if the
+diff -ur bootpd-2.4.orig/tzone.h bootpd-2.4/tzone.h
+--- bootpd-2.4.orig/tzone.h 1994-11-27 15:36:17.000000000 +0200
++++ bootpd-2.4/tzone.h 2010-07-07 14:55:03.000000000 +0300
+@@ -1,3 +1,3 @@
+ /* tzone.h */
+-extern int32 secondswest;
++extern int32_t secondswest;
+ extern void tzone_init();
diff --git a/net-misc/netkit-bootpd/metadata.xml b/net-misc/netkit-bootpd/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-misc/netkit-bootpd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild b/net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild
new file mode 100644
index 000000000000..7ae6c8941158
--- /dev/null
+++ b/net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+inherit eutils toolchain-funcs
+
+MY_P=${P/netkit-}
+
+DESCRIPTION="Netkit - bootp"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netboot/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netboot/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake linux || die
+}
+
+src_install() {
+ dosbin bootp{d,ef,gw,test} || die
+
+ for x in d ef gw test; do
+ dosym bootp${x} /usr/sbin/in.bootp${x} || die
+ done
+
+ doman *.5 *.8
+ dodoc Announce Changes Problems README{,-linux} ToDo
+}