tidwall / neco

Concurrency library for C (coroutines)
MIT License
1.1k stars 79 forks source link

linux build error #9

Closed calvin2021y closed 4 months ago

calvin2021y commented 4 months ago
neco.c:1332:5: error: conflicting types for 'dladdr'
 1332 | int dladdr(const void *, void *);
      |     ^
/usr/include/dlfcn.h:98:12: note: previous declaration is here
   98 | extern int dladdr (const void *__address, Dl_info *__info)
      |            ^
1 error generated.
tidwall commented 4 months ago

Which compiler, version, and cflags?

calvin2021y commented 4 months ago

clang version 17.0.6

--target=x86_64-pc-linux-gnu -D_GNU_SOURCE -D__UNWIND_H__ -f

tidwall commented 4 months ago

Thanks!

I just pushed a fix

I was able to get the error with:

CFLAGS="-D_GNU_SOURCE" tests/run.sh

The bug is technically with the llco project and I fixed it there too.