Revert "socket-wrapper: not all systems have FIONREAD defined"
authorStefan Metzmacher <metze@samba.org>
Wed, 7 Apr 2010 13:21:32 +0000 (15:21 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 8 Apr 2010 06:34:39 +0000 (08:34 +0200)
This reverts commit 710aa773d54509de34404f9992c5058ddfa45f3b.

We rely on FIONREAD in a lot of other parts in the code,
so there's no need to have an ifdef for it in the socket_wrapper code.

On tru64 FIONREAD is defined in <sys/ioctl.h>
and we include <sys/ioctl.h> via "system/network.h".

Tridge: maybe a HAVE_SYS_IOCTL_H was missing at the time you tried
it on tru64?

If we find a platform that doesn't support it,
we need to bail out at configure time or
provide a replacement in libreplace.

metze

lib/socket_wrapper/socket_wrapper.c

index c7530c9a15ac706324a14b0036d329a515a864e8..9d732ee65299d7e18d7e9222c11776f1e7329eab 100644 (file)
@@ -2002,7 +2002,6 @@ _PUBLIC_ int swrap_ioctl(int s, int r, void *p)
 
        ret = real_ioctl(s, r, p);
 
-#ifdef FIONREAD
        switch (r) {
        case FIONREAD:
                value = *((int *)p);
@@ -2013,7 +2012,6 @@ _PUBLIC_ int swrap_ioctl(int s, int r, void *p)
                }
                break;
        }
-#endif
 
        return ret;
 }