[libepc] Fix build failure on kFreeBSD. Bug #592474 (Petr Salinger)



commit b08f71b56d513533465c6513da9193d31f85b5fb
Author: Josselin Mouette <joss debian org>
Date:   Fri Aug 21 13:07:26 2009 +0200

    Fix build failure on kFreeBSD. Bug #592474 (Petr Salinger)

 ChangeLog         |    8 ++++++++
 tests/framework.c |    6 ++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1964742..41a8020 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-21  Josselin Mouette  <joss malsain org>
+
+	Patch by Petr Salinger.
+
+	* tests/framework.c (epc_test_list_ifaces):
+	Use ifr_index if ifr_ifindex does not exist. Fixes build failure 
+	on GNU/kFreeBSD. Bug #592474.
+
 2009-08-21  Murray Cumming  <murrayc murrayc com>
 
 	* libepc/shell.c (epc_shell_progress_update_default):
diff --git a/tests/framework.c b/tests/framework.c
index d8788bc..196ef0a 100644
--- a/tests/framework.c
+++ b/tests/framework.c
@@ -195,6 +195,12 @@ epc_test_list_ifaces (void)
           goto out;
         }
 
+/* The following allows to fall back to ifr_index on kFreeBSD, where 
+   ifr_ifindex does not exist. See bug #592474. */
+#if !defined(ifr_ifindex) && defined(ifr_index)
+#define ifr_ifindex ifr_index
+#endif
+
       ifaces[j].ifidx = req->ifr_ifindex;
       ifaces[j].mask = epc_test_result;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]