Ecore-con: Let's not break compilation if net/if.h is not found (or old system)

SVN revision: 66956
This commit is contained in:
Youness Alaoui 2012-01-07 11:39:23 +00:00
parent e36334df8d
commit ead8d51b3c
1 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,16 @@
# 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