View | Details | Raw Unified
Collapse All | Expand All

(-) gamin-0.1.2/libgamin/gam_api.c (-3 / +3 lines)
 Lines 421-427    Link Here 
{
{
    char data[2] = { 0, 0 };
    char data[2] = { 0, 0 };
    int written;
    int written;
#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
    struct {
    struct {
	    struct cmsghdr hdr;
	    struct cmsghdr hdr;
	    struct cmsgcred cred;
	    struct cmsgcred cred;
 Lines 445-451    Link Here 
#endif
#endif
retry:
retry:
#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
    written = sendmsg(fd, &msg, 0);
    written = sendmsg(fd, &msg, 0);
#else
#else
    written = write(fd, &data[0], 1);
    written = write(fd, &data[0], 1);
 Lines 655-661    Link Here 
    s_uid = getuid();
    s_uid = getuid();
#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED)
#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__)
    /* Set the socket to receive credentials on the next message */
    /* Set the socket to receive credentials on the next message */
    {
    {
        int on = 1;
        int on = 1;
(-) gamin-0.1.2/libgamin/gam_data.c (-1 / +1 lines)
 Lines 471-477    Link Here 
    }
    }
    if (is_threaded > 0) {
    if (is_threaded > 0) {
	pthread_mutexattr_init(&attr);
	pthread_mutexattr_init(&attr);
	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
	pthread_mutex_init(&ret->lock, &attr);
	pthread_mutex_init(&ret->lock, &attr);
	pthread_mutexattr_destroy(&attr);
	pthread_mutexattr_destroy(&attr);
    }
    }
(-) gamin-0.1.2/server/gam_channel.c (-3 / +3 lines)
 Lines 29-35    Link Here 
{
{
    char data[2] = { 0, 0 };
    char data[2] = { 0, 0 };
    int written;
    int written;
#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
    struct {
    struct {
	    struct cmsghdr hdr;
	    struct cmsghdr hdr;
	    struct cmsgcred cred;
	    struct cmsgcred cred;
 Lines 53-59    Link Here 
#endif
#endif
retry:
retry:
#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
    written = sendmsg(fd, &msg, 0);
    written = sendmsg(fd, &msg, 0);
#else
#else
    written = write(fd, &data[0], 1);
    written = write(fd, &data[0], 1);
 Lines 100-106    Link Here 
    s_uid = getuid();
    s_uid = getuid();
#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED)
#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__)
    /* Set the socket to receive credentials on the next message */
    /* Set the socket to receive credentials on the next message */
    {
    {
        int on = 1;
        int on = 1;
(-) gamin-0.1.2/server/gam_connection.c (-5 / +2 lines)
 Lines 30-39    Link Here 
    GMainLoop *loop;            /* the Glib loop used */
    GMainLoop *loop;            /* the Glib loop used */
    GIOChannel *source;         /* the Glib I/O Channel used */
    GIOChannel *source;         /* the Glib I/O Channel used */
    int request_len;            /* how many bytes of request are valid */
    int request_len;            /* how many bytes of request are valid */
    union {
    GAMPacket request;          /* the next request being read */
	GAMPacket request;      /* the next request being read */
	void *request_data;     /* the next request as a char *  */
    };
    GamListener *listener;      /* the listener associated with the connection */
    GamListener *listener;      /* the listener associated with the connection */
};
};
 Lines 245-251    Link Here 
    g_assert(data);
    g_assert(data);
    g_assert(size);
    g_assert(size);
    *data = (char *) &conn->request_data + conn->request_len;
    *data = (char *) &conn->request + conn->request_len;
    *size = sizeof(GAMPacket) - conn->request_len;
    *size = sizeof(GAMPacket) - conn->request_len;
    return (0);
    return (0);
(-) gamin-0.1.2/tests/testing.c (-2 / +2 lines)
 Lines 436-444    Link Here 
            return (-1);
            return (-1);
        }
        }
        /*
        /*
         * wait at most 3 secs before declaring failure
         * wait at most 7 secs before declaring failure
         */
         */
        while ((delay < 30) && (testState.nb_events < nb_events + count)) {
        while ((delay < 70) && (testState.nb_events < nb_events + count)) {
            debugLoop(100);
            debugLoop(100);
/*	    printf("+"); fflush(stdout); */
/*	    printf("+"); fflush(stdout); */