Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: conflicting types for 'gettimeofday' #22

Open
bouk opened this issue Jul 16, 2024 · 0 comments
Open

error: conflicting types for 'gettimeofday' #22

bouk opened this issue Jul 16, 2024 · 0 comments

Comments

@bouk
Copy link

bouk commented Jul 16, 2024

Hi there, I'm trying to compile but getting the following error:

> gcc  -g -ggdb -Wall -Wextra -Wno-unused-parameter -O3 -fPIC src/testlib.c       \
>         -fPIC -shared -Wl,-soname,fluxcapacitor_test.so -o fluxcapacitor_test.so
> gcc  -g -ggdb -Wall -Wextra -Wno-unused-parameter -O3 -fPIC src/preload.c -lrt -ldl -rdynamic \
>         -fPIC -shared -Wl,-soname,fluxcapacitor_preload.so -o fluxcapacitor_preload.so
> src/preload.c:50:5: error: conflicting types for 'gettimeofday'; have 'int(struct timeval *, struct timezone *)'
>    50 | int gettimeofday(struct timeval *tv, struct timezone *tz) {
>       |     ^~~~~~~~~~~~
> In file included from src/preload.c:9:
> /nix/store/x8lqlydsxbrwvf6p7v18gws8kn1xl37f-glibc-2.38-23-dev/include/sys/time.h:67:12: note: previous declaration of 'gettimeofday' with type 'int(struct timeval * restrict,  void * restrict)'
>    67 | extern int gettimeofday (struct timeval *__restrict __tv,

I guess the definition of gettimeofday changed at some point and fluxcapacitor has to get updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant