File: make-it-compile.patch

package info (click to toggle)
eql 1.2.ds1-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 184 kB
  • ctags: 10
  • sloc: ansic: 166; makefile: 6
file content (46 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From: Roberto Lumbreras
Subject: Changes needed to compile eql
  added basic Makefile
  make it compile with new kernel headers

--- /dev/null
+++ eql-1.2.ds1/Makefile
@@ -0,0 +1,7 @@
+TARGET=eql_enslave
+
+all: $(TARGET)
+
+clean:
+	rm -f $(TARGET) *.o *.a *~ core
+
--- eql-1.2.ds1.orig/eql_enslave.c
+++ eql-1.2.ds1/eql_enslave.c
@@ -11,10 +11,17 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
 #include <linux/sockios.h>
 #include <linux/if.h>
-
-#include "/usr/src/linux/drivers/net/eql.h"
+#ifndef list_head
+struct list_head {
+	struct list_head *next, *prev;
+};
+#endif
+#include <linux/if_eql.h>
 
 void check_running(char *device_name);
 
@@ -96,7 +103,7 @@ check_running(char *name)
       perror (name);
       exit (1);
     }
-  if (ifr.ifr_flags & (IFF_RUNNING | IFF_UP) != (IFF_RUNNING | IFF_UP))
+  if (ifr.ifr_flags & ((IFF_RUNNING | IFF_UP) != (IFF_RUNNING | IFF_UP)))
       {
 	fprintf (stderr, "Device '%s' is not up or running.\n", name);
 	exit (1);