Changeset 4321

Show
Ignore:
Timestamp:
03/12/09 15:06:19 (4 years ago)
Author:
Cyrus
Message:

nixio: FreeBSD compatibility #1

Location:
luci/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/build/gccconfig.mk

    r3882 r4321  
    11OS ?= $(shell uname) 
    22 
    3 LUA_SHLIBS = $(shell pkg-config --silence-errors --libs lua5.1 || pkg-config --silence-errors --libs lua) 
     3LUA_SHLIBS = $(shell pkg-config --silence-errors --libs lua5.1 || pkg-config --silence-errors --libs lua-5.1 || pkg-config --silence-errors --libs lua) 
    44LUA_LIBS = $(if $(LUA_SHLIBS),$(LUA_SHLIBS),$(firstword $(wildcard /usr/lib/liblua.a /usr/local/lib/liblua.a /opt/local/lib/liblua.a))) 
    5 LUA_CFLAGS = $(shell pkg-config --silence-errors --cflags lua5.1 || pkg-config --silence-errors --cflags lua) 
     5LUA_CFLAGS = $(shell pkg-config --silence-errors --cflags lua5.1 || pkg-config --silence-errors --cflags lua-5.1 || pkg-config --silence-errors --cflags lua) 
    66 
    77CC = gcc 
  • luci/trunk/libs/nixio/src/nixio.c

    r4316 r4321  
    180180    NIXIO_PUSH_CONSTANT(SIGUSR1); 
    181181    NIXIO_PUSH_CONSTANT(SIGUSR2); 
    182     NIXIO_PUSH_CONSTANT(SIGPOLL); 
     182    NIXIO_PUSH_CONSTANT(SIGIO); 
    183183    NIXIO_PUSH_CONSTANT(SIGURG); 
    184184 
  • luci/trunk/libs/nixio/src/sockopt.c

    r4310 r4321  
    1818 
    1919#include "nixio.h" 
     20#include <sys/types.h> 
    2021#include <sys/socket.h> 
    2122#include <netinet/in.h> 
     
    149150        } 
    150151        if (!strcmp(option, "cork")) { 
     152#ifdef TCP_CORK 
    151153            return nixio__gso_int(L, sock->fd, IPPROTO_TCP, TCP_CORK, set); 
     154#else 
     155            return nixio__pstatus(L, !(errno = ENOPROTOOPT)); 
     156#endif 
    152157        } else if (!strcmp(option, "nodelay")) { 
    153158            return nixio__gso_int(L, sock->fd, IPPROTO_TCP, TCP_NODELAY, set);