Skip to content

Build with -std=gnu99 instead of -std=c99#71

Open
fweimer-rh wants to merge 1 commit intoposva:mainfrom
fweimer-rh:c99
Open

Build with -std=gnu99 instead of -std=c99#71
fweimer-rh wants to merge 1 commit intoposva:mainfrom
fweimer-rh:c99

Conversation

@fweimer-rh
Copy link

The latter activates strict POSIX mode with glibc, which disables the declaration of usleep in <unistd.h>, leading to an implicit function declaration.

Related to:

The latter activates strict POSIX mode with glibc, which disables
the declaration of usleep in <unistd.h>, leading to an implicit
function declaration.
@posva
Copy link
Owner

posva commented Dec 22, 2022

Thanks a lot for the links, I will try to review this and others during the holidays!

@Kreijstal
Copy link

that would create libc dependency :((((

@TimB87
Copy link

TimB87 commented Nov 26, 2025

This seems to fix a build error I see that can be worked around with -Wno-implicit-function-declaration.

../catimg-2.8.0/src/catimg.c:181:21: error: implicit declaration of function 'usleep'; did you mean 'sleep'? [-Wimplicit-function-declaration]
  181 |                     usleep(img.delays[frame - 1] * 10000);
      |                     ^~~~~~
      |                     sleep
[..]
../catimg-2.8.0/src/sh_utils.c:60:14: error: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
   60 |     int fd = fileno(stdin);
      |              ^~~~~~

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

Successfully merging this pull request may close these issues.

4 participants