Bump

On Fri, Jun 10, 2011 at 9:28 AM, Jon Ringle <j...@ringle.org> wrote:
> Upstream commit that enables support for libnl-2:
> https://github.com/mcr/libpcap/commit/bc937fc4ff6715e9bee939041fa02be0755d7d58
>
> patch series rebuilt with git-ptx-patches
>
> Signed-off-by: Jon Ringle <j...@ringle.org>
> ---
>  ...FLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch |   12 +-
>  .../0002-build-and-install-share-lib-only.patch    |   38 +++
>  .../0002-dont-compile-static-lib.diff              |   34 --
>  .../0003-pcap-config-add-SYSROOT-support.patch     |   57 ++++
>  ...-for-libnl-2.x-adapted-from-a-newer-versi.patch |  343 
> ++++++++++++++++++++
>  .../0004-pcap-config-add-SYSROOT-support.patch     |   55 ----
>  patches/libpcap-1.1.1/series                       |    7 +-
>  7 files changed, 450 insertions(+), 96 deletions(-)
>  create mode 100644 
> patches/libpcap-1.1.1/0002-build-and-install-share-lib-only.patch
>  delete mode 100644 patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff
>  create mode 100644 
> patches/libpcap-1.1.1/0003-pcap-config-add-SYSROOT-support.patch
>  create mode 100644 
> patches/libpcap-1.1.1/0004-Add-support-for-libnl-2.x-adapted-from-a-newer-versi.patch
>  delete mode 100644 
> patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch
>
> diff --git 
> a/patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
>  
> b/patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
> index 25e5c9d..d772bc0 100644
> --- 
> a/patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
> +++ 
> b/patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
> @@ -1,7 +1,6 @@
> -From 80513b7c807126fddedf114d6cc35f873f9ebd16 Mon Sep 17 00:00:00 2001
>  From: Marc Kleine-Budde <m...@pengutronix.de>
>  Date: Sun, 10 Jan 2010 00:47:38 +0100
> -Subject: [PATCH 1/4] add CFLAGS, CPPFLAGS and LDFLAGS to Makefile.in
> +Subject: [PATCH] add CFLAGS, CPPFLAGS and LDFLAGS to Makefile.in
>
>  the build system is autoconf but not automake :(
>  It doesn't care about CFLAGS or CPPFLAGS from outside.
> @@ -10,10 +9,10 @@ This patch adds them.
>  Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de>
>  ---
>  Makefile.in |    2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> + 1 files changed, 1 insertions(+), 1 deletions(-)
>
> -Index: b/Makefile.in
> -===================================================================
> +diff --git a/Makefile.in b/Makefile.in
> +index f576462..ee9bfca 100644
>  --- a/Makefile.in
>  +++ b/Makefile.in
>  @@ -58,7 +58,7 @@ V_RPATH_OPT = @V_RPATH_OPT@
> @@ -25,3 +24,6 @@ Index: b/Makefile.in
>
>  INSTALL = @INSTALL@
>  INSTALL_PROGRAM = @INSTALL_PROGRAM@
> +--
> +1.7.0.4
> +
> diff --git 
> a/patches/libpcap-1.1.1/0002-build-and-install-share-lib-only.patch 
> b/patches/libpcap-1.1.1/0002-build-and-install-share-lib-only.patch
> new file mode 100644
> index 0000000..c1bf462
> --- /dev/null
> +++ b/patches/libpcap-1.1.1/0002-build-and-install-share-lib-only.patch
> @@ -0,0 +1,38 @@
> +From: Michael Olbrich <m.olbr...@pengutronix.de>
> +Date: Fri, 10 Jun 2011 08:57:31 -0400
> +Subject: [PATCH] build and install share lib only
> +
> +This patch removes the static library from the dependency list
> +for "all" and "install". This way libpcap.a is not built and
> +tcpdump cannot link against it.
> +
> +Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de>
> +---
> + Makefile.in |    4 ++--
> + 1 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/Makefile.in b/Makefile.in
> +index ee9bfca..6cab4e5 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -324,7 +324,7 @@ EXTRA_DIST = \
> +       Win32/Src/inet_net.c \
> +       Win32/Src/inet_pton.c
> +
> +-all: libpcap.a shared pcap-config
> ++all: shared pcap-config
> +
> + libpcap.a: $(OBJ)
> +       @rm -f $@
> +@@ -497,7 +497,7 @@ selpolltest: selpolltest.c libpcap.a
> + opentest: opentest.c libpcap.a
> +       $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a 
> $(LIBS)
> +
> +-install: install-shared install-archive pcap-config
> ++install: install-shared pcap-config
> +       [ -d $(DESTDIR)$(libdir) ] || \
> +           (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
> +       [ -d $(DESTDIR)$(includedir) ] || \
> +--
> +1.7.0.4
> +
> diff --git a/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff 
> b/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff
> deleted file mode 100644
> index fefd05e..0000000
> --- a/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -From: Michael Olbrich <m.olbr...@pengutronix.de>
> -Subject: build and install share lib only
> -
> -This patch removes the static library from the dependency list
> -for "all" and "install". This way libpcap.a is not built and
> -tcpdump cannot link against it.
> -
> -Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de>
> ----
> - Makefile.in |    4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -Index: b/Makefile.in
> -===================================================================
> ---- a/Makefile.in
> -+++ b/Makefile.in
> -@@ -324,7 +324,7 @@ EXTRA_DIST = \
> -       Win32/Src/inet_net.c \
> -       Win32/Src/inet_pton.c
> -
> --all: libpcap.a shared pcap-config
> -+all: shared pcap-config
> -
> - libpcap.a: $(OBJ)
> -       @rm -f $@
> -@@ -497,7 +497,7 @@ selpolltest: selpolltest.c libpcap.a
> - opentest: opentest.c libpcap.a
> -       $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a 
> $(LIBS)
> -
> --install: install-shared install-archive pcap-config
> -+install: install-shared pcap-config
> -       [ -d $(DESTDIR)$(libdir) ] || \
> -           (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
> -       [ -d $(DESTDIR)$(includedir) ] || \
> diff --git a/patches/libpcap-1.1.1/0003-pcap-config-add-SYSROOT-support.patch 
> b/patches/libpcap-1.1.1/0003-pcap-config-add-SYSROOT-support.patch
> new file mode 100644
> index 0000000..2b13f5a
> --- /dev/null
> +++ b/patches/libpcap-1.1.1/0003-pcap-config-add-SYSROOT-support.patch
> @@ -0,0 +1,57 @@
> +From: Marc Kleine-Budde <m...@pengutronix.de>
> +Date: Sun, 10 Jan 2010 00:49:07 +0100
> +Subject: [PATCH] pcap-config: add SYSROOT support
> +
> +Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de>
> +---
> + pcap-config.in |   16 ++++++++--------
> + 1 files changed, 8 insertions(+), 8 deletions(-)
> +
> +diff --git a/pcap-config.in b/pcap-config.in
> +index 37526d7..7ac273f 100644
> +--- a/pcap-config.in
> ++++ b/pcap-config.in
> +@@ -47,16 +47,16 @@ then
> +       #
> +       if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
> +       then
> +-              echo "-I@includedir@ -L@libdir@ -lpcap @LIBS@"
> ++              echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ -lpcap 
> @LIBS@"
> +       elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
> +       then
> +-              echo "-I@includedir@ -L@libdir@ @LIBS@"
> ++              echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ @LIBS@"
> +       elif [ "$show_cflags" = 1 ]
> +       then
> +-              echo "-I@includedir@"
> ++              echo "-I${SYSROOT}@includedir@"
> +       elif [ "$show_libs" = 1 ]
> +       then
> +-              echo "-L@libdir@ -lpcap @LIBS@"
> ++              echo "-L${SYSROOT}@libdir@ -lpcap @LIBS@"
> +       elif [ "$show_additional_libs" = 1 ]
> +       then
> +               echo "@LIBS@"
> +@@ -68,15 +68,15 @@ else
> +       #
> +       if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
> +       then
> +-              echo "-I@includedir@ -L@libdir@ $RPATH -lpcap"
> ++              echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ $RPATH 
> -lpcap"
> +       elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
> +       then
> +-              echo "-I@includedir@"
> ++              echo "-I${SYSROOT}@includedir@"
> +       elif [ "$show_cflags" = 1 ]
> +       then
> +-              echo "-I@includedir@"
> ++              echo "-I${SYSROOT}@includedir@"
> +       elif [ "$show_libs" = 1 ]
> +       then
> +-              echo "-L@libdir@ $RPATH -lpcap"
> ++              echo "-L:{SYSROOT}@libdir@ $RPATH -lpcap"
> +       fi
> + fi
> +--
> +1.7.0.4
> +
> diff --git 
> a/patches/libpcap-1.1.1/0004-Add-support-for-libnl-2.x-adapted-from-a-newer-versi.patch
>  
> b/patches/libpcap-1.1.1/0004-Add-support-for-libnl-2.x-adapted-from-a-newer-versi.patch
> new file mode 100644
> index 0000000..e3ad70e
> --- /dev/null
> +++ 
> b/patches/libpcap-1.1.1/0004-Add-support-for-libnl-2.x-adapted-from-a-newer-versi.patch
> @@ -0,0 +1,343 @@
> +From: Guy Harris <g...@alum.mit.edu>
> +Date: Sat, 13 Nov 2010 17:42:47 -0800
> +Subject: [PATCH] Add support for libnl 2.x, adapted from a newer version of 
> the iw command.
> +
> +---
> + config.h.in  |    3 ++
> + configure    |  108 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
> + configure.in |   40 ++++++++++++++++++----
> + pcap-linux.c |   58 ++++++++++++++++++++++++-------
> + 4 files changed, 184 insertions(+), 25 deletions(-)
> +
> +diff --git a/config.h.in b/config.h.in
> +index 55e13da..c1ceefe 100644
> +--- a/config.h.in
> ++++ b/config.h.in
> +@@ -52,6 +52,9 @@
> + /* if libnl exists */
> + #undef HAVE_LIBNL
> +
> ++/* if libnl exists and is version 2.x */
> ++#undef HAVE_LIBNL_2_x
> ++
> + /* Define to 1 if you have the <limits.h> header file. */
> + #undef HAVE_LIMITS_H
> +
> +diff --git a/configure b/configure
> +index 390aba0..4917a04 100755
> +--- a/configure
> ++++ b/configure
> +@@ -7322,7 +7322,93 @@ fi
> +
> +
> +       if test x$with_libnl != xno ; then
> +-              { echo "$as_me:$LINENO: checking for nl_handle_alloc in -lnl" 
> >&5
> ++              #
> ++              # Try libnl 2.x first.
> ++              #
> ++              { echo "$as_me:$LINENO: checking for nl_socket_alloc in -lnl" 
> >&5
> ++echo $ECHO_N "checking for nl_socket_alloc in -lnl... $ECHO_C" >&6; }
> ++if test "${ac_cv_lib_nl_nl_socket_alloc+set}" = set; then
> ++  echo $ECHO_N "(cached) $ECHO_C" >&6
> ++else
> ++  ac_check_lib_save_LIBS=$LIBS
> ++LIBS="-lnl  $LIBS"
> ++cat >conftest.$ac_ext <<_ACEOF
> ++/* confdefs.h.  */
> ++_ACEOF
> ++cat confdefs.h >>conftest.$ac_ext
> ++cat >>conftest.$ac_ext <<_ACEOF
> ++/* end confdefs.h.  */
> ++
> ++/* Override any GCC internal prototype to avoid an error.
> ++   Use char because int might match the return type of a GCC
> ++   builtin and then its argument prototype would still apply.  */
> ++#ifdef __cplusplus
> ++extern "C"
> ++#endif
> ++char nl_socket_alloc ();
> ++int
> ++main ()
> ++{
> ++return nl_socket_alloc ();
> ++  ;
> ++  return 0;
> ++}
> ++_ACEOF
> ++rm -f conftest.$ac_objext conftest$ac_exeext
> ++if { (ac_try="$ac_link"
> ++case "(($ac_try" in
> ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
> ++  *) ac_try_echo=$ac_try;;
> ++esac
> ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
> ++  (eval "$ac_link") 2>conftest.er1
> ++  ac_status=$?
> ++  grep -v '^ *+' conftest.er1 >conftest.err
> ++  rm -f conftest.er1
> ++  cat conftest.err >&5
> ++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
> ++  (exit $ac_status); } && {
> ++       test -z "$ac_c_werror_flag" ||
> ++       test ! -s conftest.err
> ++       } && test -s conftest$ac_exeext &&
> ++       $as_test_x conftest$ac_exeext; then
> ++  ac_cv_lib_nl_nl_socket_alloc=yes
> ++else
> ++  echo "$as_me: failed program was:" >&5
> ++sed 's/^/| /' conftest.$ac_ext >&5
> ++
> ++      ac_cv_lib_nl_nl_socket_alloc=no
> ++fi
> ++
> ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
> ++      conftest$ac_exeext conftest.$ac_ext
> ++LIBS=$ac_check_lib_save_LIBS
> ++fi
> ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nl_nl_socket_alloc" >&5
> ++echo "${ECHO_T}$ac_cv_lib_nl_nl_socket_alloc" >&6; }
> ++if test $ac_cv_lib_nl_nl_socket_alloc = yes; then
> ++
> ++                      #
> ++                      # Yes, we have libnl 2.x.
> ++                      #
> ++                      LIBS="-lnl-genl -lnl $LIBS"
> ++
> ++cat >>confdefs.h <<\_ACEOF
> ++#define HAVE_LIBNL 1
> ++_ACEOF
> ++
> ++
> ++cat >>confdefs.h <<\_ACEOF
> ++#define HAVE_LIBNL_2_x 1
> ++_ACEOF
> ++
> ++
> ++else
> ++
> ++                      #
> ++                      # No, we don't; do we have libnl 1.x?
> ++                      #
> ++                      { echo "$as_me:$LINENO: checking for nl_handle_alloc 
> in -lnl" >&5
> + echo $ECHO_N "checking for nl_handle_alloc in -lnl... $ECHO_C" >&6; }
> + if test "${ac_cv_lib_nl_nl_handle_alloc+set}" = set; then
> +   echo $ECHO_N "(cached) $ECHO_C" >&6
> +@@ -7384,18 +7470,30 @@ fi
> + { echo "$as_me:$LINENO: result: $ac_cv_lib_nl_nl_handle_alloc" >&5
> + echo "${ECHO_T}$ac_cv_lib_nl_nl_handle_alloc" >&6; }
> + if test $ac_cv_lib_nl_nl_handle_alloc = yes; then
> +-  LIBS="-lnl $LIBS"
> ++
> ++                              #
> ++                              # Yes.
> ++                              #
> ++                              LIBS="-lnl $LIBS"
> +
> + cat >>confdefs.h <<\_ACEOF
> + #define HAVE_LIBNL 1
> + _ACEOF
> +
> ++
> + else
> +-  if test x$with_libnl = xyes ; then
> +-                              { { echo "$as_me:$LINENO: error: libnl 
> support requested but libnl not found" >&5
> ++
> ++                              #
> ++                              # No, we don't have libnl at all.
> ++                              #
> ++                              if test x$with_libnl = xyes ; then
> ++                                      { { echo "$as_me:$LINENO: error: 
> libnl support requested but libnl not found" >&5
> + echo "$as_me: error: libnl support requested but libnl not found" >&2;}
> +    { (exit 1); exit 1; }; }
> +-                      fi
> ++                              fi
> ++
> ++fi
> ++
> +
> + fi
> +
> +diff --git a/configure.in b/configure.in
> +index 794da27..58ba5c8 100644
> +--- a/configure.in
> ++++ b/configure.in
> +@@ -445,13 +445,39 @@ linux)
> +               with_libnl=$withval,,)
> +
> +       if test x$with_libnl != xno ; then
> +-              AC_CHECK_LIB(nl, nl_handle_alloc,
> +-                      LIBS="-lnl $LIBS"
> +-                      AC_DEFINE(HAVE_LIBNL,1,[if libnl exists]),
> +-                      if test x$with_libnl = xyes ; then
> +-                              AC_MSG_ERROR([libnl support requested but 
> libnl not found])
> +-                      fi
> +-              )
> ++              #
> ++              # Try libnl 2.x first.
> ++              #
> ++              AC_CHECK_LIB(nl, nl_socket_alloc,
> ++              [
> ++                      #
> ++                      # Yes, we have libnl 2.x.
> ++                      #
> ++                      LIBS="-lnl-genl -lnl $LIBS"
> ++                      AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
> ++                      AC_DEFINE(HAVE_LIBNL_2_x,1,[if libnl exists and is 
> version 2.x])
> ++              ],
> ++              [
> ++                      #
> ++                      # No, we don't; do we have libnl 1.x?
> ++                      #
> ++                      AC_CHECK_LIB(nl, nl_handle_alloc,
> ++                      [
> ++                              #
> ++                              # Yes.
> ++                              #
> ++                              LIBS="-lnl $LIBS"
> ++                              AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
> ++                      ],
> ++                      [
> ++                              #
> ++                              # No, we don't have libnl at all.
> ++                              #
> ++                              if test x$with_libnl = xyes ; then
> ++                                      AC_MSG_ERROR([libnl support requested 
> but libnl not found])
> ++                              fi
> ++                      ])
> ++              ])
> +       fi
> +
> +       AC_LBL_TPACKET_STATS
> +diff --git a/pcap-linux.c b/pcap-linux.c
> +index af12543..ee372e5 100644
> +--- a/pcap-linux.c
> ++++ b/pcap-linux.c
> +@@ -501,8 +501,37 @@ get_mac80211_phydev(pcap_t *handle, const char *device, 
> char *phydev_path,
> +       return 1;
> + }
> +
> ++#ifndef HAVE_LIBNL_2_x
> ++/* libnl 2.x compatibility code */
> ++
> ++#define nl_sock nl_handle
> ++
> ++static inline struct nl_handle *
> ++nl_socket_alloc(void)
> ++{
> ++      return nl_handle_alloc();
> ++}
> ++
> ++static inline void
> ++nl_socket_free(struct nl_handle *h)
> ++{
> ++      nl_handle_destroy(h);
> ++}
> ++
> ++static inline int
> ++__genl_ctrl_alloc_cache(struct nl_handle *h, struct nl_cache **cache)
> ++{
> ++      struct nl_cache *tmp = genl_ctrl_alloc_cache(h);
> ++      if (!tmp)
> ++              return -ENOMEM;
> ++      *cache = tmp;
> ++      return 0;
> ++}
> ++#define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
> ++#endif /* !HAVE_LIBNL_2_x */
> ++
> + struct nl80211_state {
> +-      struct nl_handle *nl_handle;
> ++      struct nl_sock *nl_sock;
> +       struct nl_cache *nl_cache;
> +       struct genl_family *nl80211;
> + };
> +@@ -510,23 +539,26 @@ struct nl80211_state {
> + static int
> + nl80211_init(pcap_t *handle, struct nl80211_state *state, const char 
> *device)
> + {
> +-      state->nl_handle = nl_handle_alloc();
> +-      if (!state->nl_handle) {
> ++      int err;
> ++
> ++      state->nl_sock = nl_socket_alloc();
> ++      if (!state->nl_sock) {
> +               snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
> +                   "%s: failed to allocate netlink handle", device);
> +               return PCAP_ERROR;
> +       }
> +
> +-      if (genl_connect(state->nl_handle)) {
> ++      if (genl_connect(state->nl_sock)) {
> +               snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
> +                   "%s: failed to connect to generic netlink", device);
> +               goto out_handle_destroy;
> +       }
> +
> +-      state->nl_cache = genl_ctrl_alloc_cache(state->nl_handle);
> +-      if (!state->nl_cache) {
> ++      err = genl_ctrl_alloc_cache(state->nl_sock, &state->nl_cache);
> ++      if (err < 0) {
> +               snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
> +-                  "%s: failed to allocate generic netlink cache", device);
> ++                  "%s: failed to allocate generic netlink cache: %s",
> ++                  device, strerror(-err));
> +               goto out_handle_destroy;
> +       }
> +
> +@@ -542,7 +574,7 @@ nl80211_init(pcap_t *handle, struct nl80211_state 
> *state, const char *device)
> + out_cache_free:
> +       nl_cache_free(state->nl_cache);
> + out_handle_destroy:
> +-      nl_handle_destroy(state->nl_handle);
> ++      nl_socket_free(state->nl_sock);
> +       return PCAP_ERROR;
> + }
> +
> +@@ -551,7 +583,7 @@ nl80211_cleanup(struct nl80211_state *state)
> + {
> +       genl_family_put(state->nl80211);
> +       nl_cache_free(state->nl_cache);
> +-      nl_handle_destroy(state->nl_handle);
> ++      nl_socket_free(state->nl_sock);
> + }
> +
> + static int
> +@@ -579,7 +611,7 @@ add_mon_if(pcap_t *handle, int sock_fd, struct 
> nl80211_state *state,
> +       NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, mondevice);
> +       NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, NL80211_IFTYPE_MONITOR);
> +
> +-      err = nl_send_auto_complete(state->nl_handle, msg);
> ++      err = nl_send_auto_complete(state->nl_sock, msg);
> +       if (err < 0) {
> +               if (err == -ENFILE) {
> +                       /*
> +@@ -600,7 +632,7 @@ add_mon_if(pcap_t *handle, int sock_fd, struct 
> nl80211_state *state,
> +                       return PCAP_ERROR;
> +               }
> +       }
> +-      err = nl_wait_for_ack(state->nl_handle);
> ++      err = nl_wait_for_ack(state->nl_sock);
> +       if (err < 0) {
> +               if (err == -ENFILE) {
> +                       /*
> +@@ -659,7 +691,7 @@ del_mon_if(pcap_t *handle, int sock_fd, struct 
> nl80211_state *state,
> +                   0, NL80211_CMD_DEL_INTERFACE, 0);
> +       NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
> +
> +-      err = nl_send_auto_complete(state->nl_handle, msg);
> ++      err = nl_send_auto_complete(state->nl_sock, msg);
> +       if (err < 0) {
> +               if (err == -ENFILE) {
> +                       /*
> +@@ -680,7 +712,7 @@ del_mon_if(pcap_t *handle, int sock_fd, struct 
> nl80211_state *state,
> +                       return PCAP_ERROR;
> +               }
> +       }
> +-      err = nl_wait_for_ack(state->nl_handle);
> ++      err = nl_wait_for_ack(state->nl_sock);
> +       if (err < 0) {
> +               if (err == -ENFILE) {
> +                       /*
> +--
> +1.7.0.4
> +
> diff --git a/patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch 
> b/patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch
> deleted file mode 100644
> index 457a7aa..0000000
> --- a/patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -From e41188c0eb0cbd906c4c649ea2f13de2d57b79ee Mon Sep 17 00:00:00 2001
> -From: Marc Kleine-Budde <m...@pengutronix.de>
> -Date: Sun, 10 Jan 2010 00:49:07 +0100
> -Subject: [PATCH 4/4] pcap-config: add SYSROOT support
> -
> -Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de>
> ----
> - pcap-config.in |   16 ++++++++--------
> - 1 file changed, 8 insertions(+), 8 deletions(-)
> -
> -Index: b/pcap-config.in
> -===================================================================
> ---- a/pcap-config.in
> -+++ b/pcap-config.in
> -@@ -47,16 +47,16 @@ then
> -       #
> -       if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
> -       then
> --              echo "-I@includedir@ -L@libdir@ -lpcap @LIBS@"
> -+              echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ -lpcap 
> @LIBS@"
> -       elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
> -       then
> --              echo "-I@includedir@ -L@libdir@ @LIBS@"
> -+              echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ @LIBS@"
> -       elif [ "$show_cflags" = 1 ]
> -       then
> --              echo "-I@includedir@"
> -+              echo "-I${SYSROOT}@includedir@"
> -       elif [ "$show_libs" = 1 ]
> -       then
> --              echo "-L@libdir@ -lpcap @LIBS@"
> -+              echo "-L${SYSROOT}@libdir@ -lpcap @LIBS@"
> -       elif [ "$show_additional_libs" = 1 ]
> -       then
> -               echo "@LIBS@"
> -@@ -68,15 +68,15 @@ else
> -       #
> -       if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
> -       then
> --              echo "-I@includedir@ -L@libdir@ $RPATH -lpcap"
> -+              echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ $RPATH 
> -lpcap"
> -       elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
> -       then
> --              echo "-I@includedir@"
> -+              echo "-I${SYSROOT}@includedir@"
> -       elif [ "$show_cflags" = 1 ]
> -       then
> --              echo "-I@includedir@"
> -+              echo "-I${SYSROOT}@includedir@"
> -       elif [ "$show_libs" = 1 ]
> -       then
> --              echo "-L@libdir@ $RPATH -lpcap"
> -+              echo "-L:{SYSROOT}@libdir@ $RPATH -lpcap"
> -       fi
> - fi
> diff --git a/patches/libpcap-1.1.1/series b/patches/libpcap-1.1.1/series
> index 9c6cddc..3846232 100644
> --- a/patches/libpcap-1.1.1/series
> +++ b/patches/libpcap-1.1.1/series
> @@ -1,3 +1,6 @@
> +# generated by git-ptx-patches
>  0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
> -0002-dont-compile-static-lib.diff
> -0004-pcap-config-add-SYSROOT-support.patch
> +0002-build-and-install-share-lib-only.patch
> +0003-pcap-config-add-SYSROOT-support.patch
> +0004-Add-support-for-libnl-2.x-adapted-from-a-newer-versi.patch
> +# c224277a4dc7500f4249c02721fd3cb8  - git-ptx-patches magic
> --
> 1.7.0.4
>
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to