i've committed this. i'll worry about old systems when someone complains again. -mike 2012-02-04 Mike Frysinger * config.in: Regenerate. * configure: Likewise. * configure.ac: Add linux/types.h to AC_CHECK_HEADERS. * dv-eth_phy.c: Check for HAVE_LINUX_TYPES_H, and delete __u16 and _LINUX_TYPES_H defines. --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -54,7 +54,14 @@ SIM_AC_OPTION_HARDWARE(yes,,\ ) AC_CHECK_FUNCS([getuid getgid geteuid getegid setuid setgid mmap munmap kill pread]) -AC_CHECK_HEADERS([sys/ioctl.h sys/mman.h net/if.h linux/if_tun.h linux/mii.h]) +AC_CHECK_HEADERS([ \ + linux/if_tun.h \ + linux/mii.h \ + linux/types.h \ + net/if.h \ + sys/ioctl.h \ + sys/mman.h \ +]) BFIN_SIM_EXTRA_OBJS= --- a/sim/bfin/dv-eth_phy.c +++ b/sim/bfin/dv-eth_phy.c @@ -23,11 +23,10 @@ #include "sim-main.h" #include "devices.h" -#ifdef HAVE_LINUX_MII_H +#if defined (HAVE_LINUX_MII_H) && defined (HAVE_LINUX_TYPES_H) /* Workaround old/broken linux headers. */ -#define _LINUX_TYPES_H -#define __u16 unsigned short +#include #include #define REG_PHY_SIZE 0x20