Changeset 1626 for zzuf/trunk


Ignore:
Timestamp:
Jan 8, 2007, 10:03:32 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Define socklen_t to int if it does not exist.
Location:
zzuf/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r1622 r1626  
    2222AC_CHECK_TYPES(sig_t, [], [],
    2323  [#include <signal.h>])
     24AC_CHECK_TYPES(socklen_t, [], [],
     25  [#include <sys/types.h>])
    2426
    2527AC_CHECK_FUNCS(getopt_long,
  • zzuf/trunk/src/load-fd.c

    r1621 r1626  
    4646#include "fd.h"
    4747
     48#ifdef HAVE_SOCKLEN_T
     49#   define SOCKLEN_T socklen_t
     50#else
     51#   define SOCKLEN_T int
     52#endif
     53
    4854/* Library functions that we divert */
    4955static int     (*open_orig)    (const char *file, int oflag, ...);
     
    5258#endif
    5359static int     (*accept_orig)  (int sockfd, struct sockaddr *addr,
    54                                 socklen_t *addrlen);
     60                                SOCKLEN_T *addrlen);
    5561static int     (*socket_orig)  (int domain, int type, int protocol);
    5662static ssize_t (*read_orig)    (int fd, void *buf, size_t count);
     
    135141#endif
    136142
    137 int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
     143int accept(int sockfd, struct sockaddr *addr, SOCKLEN_T *addrlen)
    138144{
    139145    int ret;
Note: See TracChangeset for help on using the changeset viewer.