Skip to content

Instantly share code, notes, and snippets.

@deoxxa
Created May 13, 2012 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deoxxa/2688819 to your computer and use it in GitHub Desktop.
Save deoxxa/2688819 to your computer and use it in GitHub Desktop.

libuv is in ./libuv and was compiled like so:

$ CC=armeb-linux-gcc AR=armeb-linux-ar make

FIXED NOW

For anyone googling and finding this (hello, anonymous stranger), check out the following link:

https://forum.openwrt.org/viewtopic.php?id=23246

TL;DR: add "-D_XOPEN_SOURCE=600" to your CFLAGS. See the Makefile below.

CC = armeb-linux-gcc
CFLAGS += -Wall -Wextra -I ./libuv/include -D_XOPEN_SOURCE=600
LDFLAGS += -static
all: test.c
$(CC) $(CFLAGS) $(LDFLAGS) -o test test.c ./libuv/uv.a
clean:
rm -f obj/* bin/*
deoxxa@kage:~/work/seriousbusiness/libuv$ make
armeb-linux-gcc -Wall -Wextra -I ./libuv/include -o test test.c ./libuv/uv.a
In file included from ./libuv/include/uv.h:67,
from test.c:1:
./libuv/include/uv-private/uv-unix.h:60: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uv_rwlock_t'
In file included from test.c:1:
./libuv/include/uv.h:1569: error: expected ')' before '*' token
./libuv/include/uv.h:1570: error: expected ')' before '*' token
./libuv/include/uv.h:1571: error: expected ')' before '*' token
./libuv/include/uv.h:1572: error: expected ')' before '*' token
./libuv/include/uv.h:1573: error: expected ')' before '*' token
./libuv/include/uv.h:1574: error: expected ')' before '*' token
./libuv/include/uv.h:1575: error: expected ')' before '*' token
./libuv/include/uv.h:1576: error: expected ')' before '*' token
make: *** [all] Error 1
#include <uv.h>
int main() {
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment