[packages] gettext: fix hardcoded shell, corrects calling libtool in intl/ after...
[openwrt/svn-archive/archive.git] / libs / libnet-1.1.x / patches / 100-debian-subset.patch
1 --- a/configure.in
2 +++ b/configure.in
3 @@ -21,7 +21,7 @@
4 dnl
5 AC_PROG_CC
6 AC_PROG_INSTALL
7 -AC_PROG_RANLIB
8 +AC_PROG_LIBTOOL
9
10 AC_CHECK_HEADERS(sys/sockio.h)
11
12 --- a/include/libnet/libnet-functions.h
13 +++ b/include/libnet/libnet-functions.h
14 @@ -1429,7 +1429,7 @@
15 * @param ptag protocol tag to modify an existing header, 0 to build a new one
16 * @return protocol tag value on success, -1 on error
17 */
18 -inline u_int32_t
19 +u_int32_t
20 libnet_getgre_length(u_int16_t fv);
21
22 /**
23 --- a/Makefile.am
24 +++ b/Makefile.am
25 @@ -12,4 +12,4 @@
26
27 EXTRA_DIST = Makefile.am.common
28
29 -bin_scripts = libnet-config
30 +bin_SCRIPTS = libnet-config
31 --- a/sample/Makefile.am
32 +++ b/sample/Makefile.am
33 @@ -60,4 +60,4 @@
34 ip_link_SOURCES = ip_link.c
35 sebek_SOURCES = sebek.c
36
37 -LDADD = $(top_srcdir)/src/libnet.a
38 +LDADD = $(top_srcdir)/src/libnet.la
39 --- a/src/libnet_checksum.c
40 +++ b/src/libnet_checksum.c
41 @@ -42,8 +42,10 @@
42 libnet_in_cksum(u_int16_t *addr, int len)
43 {
44 int sum;
45 + u_int16_t last_byte;
46
47 sum = 0;
48 + last_byte = 0;
49
50 while (len > 1)
51 {
52 @@ -52,7 +54,8 @@
53 }
54 if (len == 1)
55 {
56 - sum += *(u_int16_t *)addr;
57 + *(u_int8_t*)&last_byte = *(u_int8_t*)addr;
58 + sum += last_byte;
59 }
60
61 return (sum);
62 --- a/src/Makefile.am
63 +++ b/src/Makefile.am
64 @@ -8,9 +8,9 @@
65
66 include $(top_srcdir)/Makefile.am.common
67
68 -lib_LIBRARIES = libnet.a
69 +lib_LTLIBRARIES = libnet.la
70
71 -libnet_a_SOURCES = libnet_asn1.c \
72 +libnet_la_SOURCES = libnet_asn1.c \
73 libnet_build_802.1q.c \
74 libnet_build_802.1x.c \
75 libnet_build_802.2.c \
76 @@ -57,15 +57,20 @@
77 libnet_version.c \
78 libnet_write.c
79
80 -EXTRA_libnet_a_SOURCES = libnet_link_bpf.c \
81 - libnet_link_dlpi.c \
82 - libnet_link_linux.c \
83 - libnet_link_nit.c \
84 - libnet_link_none.c \
85 - libnet_link_pf.c \
86 - libnet_link_snit.c \
87 - libnet_link_snoop.c \
88 - libnet_link_win32.c
89 -
90 -libnet_a_LIBADD = @LIBOBJS@
91 +libnet_la_LIBADD = @LTLIBOBJS@
92
93 +# Here are a set of rules to help you update your library version
94 +# information:
95 +#
96 +# 1. If the library source code has changed at all since the last
97 +# update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
98 +#
99 +# 2. If any interfaces have been added, removed, or changed since the
100 +# last update, increment CURRENT, and set REVISION to 0.
101 +#
102 +# 3. If any interfaces have been added since the last public release,
103 +# then increment AGE.
104 +#
105 +# 4. If any interfaces have been removed since the last public release,
106 +# then set AGE to 0.
107 +libnet_la_LDFLAGS = -version-info 4:0:3 # CURRENT[:REVISION[:AGE]]