Ecore-con: Let's not break compilation if net/if.h is not found (or old system)
authorkakaroto <kakaroto@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 7 Jan 2012 11:39:23 +0000 (11:39 +0000)
committerkakaroto <kakaroto@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 7 Jan 2012 11:39:23 +0000 (11:39 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@66956 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con_socks.c

index c960618..aecaff0 100644 (file)
 # include <net/if.h>
 #endif
 
+/* if net/if.h is not found or if an older versions of net/if.h is provided
+   which does not define IF_NAMESIZE. We must define it ourselves */
+#ifndef IF_NAMESIZE
+#  ifdef IFNAMSIZ
+#    define IF_NAMESIZE IFNAMSIZ
+#  else
+#    define IF_NAMESIZE 16
+#  endif
+#endif
+
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif