145 lines
2.8 KiB
Plaintext
145 lines
2.8 KiB
Plaintext
--- Makefile
|
|
+++ Makefile
|
|
@@ -1,7 +1,7 @@
|
|
|
|
OBJS = ipxd.o ipxripd.o ipxsapd.o ipxsap.o ipxrip.o ipxkern.o ipxutil.o
|
|
|
|
-CFLAGS = -Wall -O2 -g
|
|
+CFLAGS = -Wall $(RPM_OPT_FLAGS)
|
|
|
|
all: ipxd
|
|
|
|
@@ -9,9 +9,11 @@
|
|
gcc -M *.c >.depend
|
|
|
|
install: all
|
|
- install --strip ipxd -m 755 /usr/sbin
|
|
- install ipxd.8 -m 755 /usr/man/man8
|
|
- install ipx_ticks.5 -m 755 /usr/man/man5
|
|
+ install -d -m 755 $(DESTDIR)/usr/sbin
|
|
+ install -d -m 755 $(DESTDIR)/usr/share/man/man{5,8}
|
|
+ install ipxd -m 755 $(DESTDIR)/usr/sbin
|
|
+ install ipxd.8 -m 644 $(DESTDIR)/usr/share/man/man8
|
|
+ install ipx_ticks.5 -m 644 $(DESTDIR)/usr/share/man/man5
|
|
|
|
release:
|
|
mkdir ../release/router
|
|
--- ipxd.c
|
|
+++ ipxd.c
|
|
@@ -29,6 +29,7 @@
|
|
#include <sys/ioctl.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
+#include <time.h>
|
|
|
|
#include "ipxd.h"
|
|
#include "ipxripd.h"
|
|
@@ -61,7 +62,7 @@
|
|
|
|
int new_log_entry=1;
|
|
int debug_option=0;
|
|
-FILE *log_file=stderr;
|
|
+FILE *log_file;
|
|
|
|
static IPXNet
|
|
ifc_net(struct ipx_interface *ifc)
|
|
@@ -714,6 +715,8 @@
|
|
int
|
|
main(int argc,char** argv)
|
|
{
|
|
+ log_file=stderr;
|
|
+
|
|
if (parse_cmdline(argc,argv))
|
|
{
|
|
daemonize();
|
|
--- ipxkern.c
|
|
+++ ipxkern.c
|
|
@@ -24,7 +24,11 @@
|
|
#include <sys/ioctl.h>
|
|
#include <sys/socket.h>
|
|
#include <string.h>
|
|
+#if defined __GLIBC__ && __GLIBC__ >= 2
|
|
+#include <net/route.h>
|
|
+#else
|
|
#include <linux/route.h>
|
|
+#endif
|
|
#include <netinet/in.h>
|
|
#include "ipxkern.h"
|
|
|
|
--- ipxrip.c
|
|
+++ ipxrip.c
|
|
@@ -19,6 +19,7 @@
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
+#include <time.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include "ipxrip.h"
|
|
--- ipxripd.c
|
|
+++ ipxripd.c
|
|
@@ -30,6 +30,7 @@
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
+#include <time.h>
|
|
#include <sys/ioctl.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
@@ -38,7 +39,9 @@
|
|
#include <string.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
+#if !(defined __GLIBC__ && __GLIBC__ >= 2)
|
|
#include <linux/ipx.h>
|
|
+#endif
|
|
#include "ipxutil.h"
|
|
#include "ipxkern.h"
|
|
#include "ipxrip.h"
|
|
--- ipxsap.c
|
|
+++ ipxsap.c
|
|
@@ -21,6 +21,7 @@
|
|
*/
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
+#include <time.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include "ipxsap.h"
|
|
--- ipxsapd.c
|
|
+++ ipxsapd.c
|
|
@@ -23,6 +23,7 @@
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
+#include <time.h>
|
|
#include <sys/ioctl.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
@@ -31,7 +32,11 @@
|
|
#include <errno.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
+#if defined __GLIBC__ && __GLIBC__ >= 2
|
|
+#include <netipx/ipx.h>
|
|
+#else
|
|
#include <linux/ipx.h>
|
|
+#endif
|
|
#include "ipxutil.h"
|
|
#include "ipxkern.h"
|
|
#include "ipxsap.h"
|
|
--- ipxutil.h
|
|
+++ ipxutil.h
|
|
@@ -25,7 +25,11 @@
|
|
#define __IPXUTIL_H__
|
|
|
|
#include <stdio.h>
|
|
+#if defined __GLIBC__ && __GLIBC__ >= 2
|
|
+#include <netipx/ipx.h>
|
|
+#else
|
|
#include <linux/ipx.h>
|
|
+#endif
|
|
|
|
#define IPX_MAX_ERROR (255)
|
|
#define IPX_THIS_NET (0)
|