Ignore:
Timestamp:
Jul 12, 2013, 5:55:23 AM (7 years ago)
Author:
jmr@…
Message:

wrap kqueue use in appropriate ifdefs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/pextlib1.0/tracelib.c

    r108069 r108070  
    4747#include <stdlib.h>
    4848#include <string.h>
     49#if HAVE_SYS_EVENT_H
    4950#include <sys/event.h>
     51#endif
    5052#include <sys/resource.h>
    5153#include <sys/socket.h>
     
    539541}
    540542
     543#if HAVE_KQUEUE
    541544/* create this on heap rather than stack, due to its rather large size */
    542545static struct kevent res_kevents[MAX_SOCKETS];
     546#endif
     547
    543548static int TracelibRunCmd(Tcl_Interp *in) {
     549#if HAVE_KQUEUE
    544550    struct kevent kev;
    545551    int flags;
     
    773779
    774780    return TCL_OK;
     781#else
     782    Tcl_SetResult(in, "tracelib not supported on this platform", TCL_STATIC);
     783    return TCL_ERROR;
     784#endif
    775785}
    776786
Note: See TracChangeset for help on using the changeset viewer.