Skip to content

Commit

Permalink
tls: Include <fcntl.h> instead of <sys/fcntl.h>
Browse files Browse the repository at this point in the history
musl libc warns about it:
```
In file included from src/tls/cockpit-certificate-ensure.c:32:
/usr/x86_64-pc-linux-musl/include/sys/fcntl.h:1:2: warning: redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-W#warnings]
    1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
      |  ^
```
and it's just a wrapper in glibc as well. Use `<fcntl.h>` to be warning-free
when building against musl
  • Loading branch information
marv authored and martinpitt committed Oct 23, 2023
1 parent b7911ff commit 330545d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tls/cockpit-certificate-ensure.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#include <assert.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <spawn.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
Expand Down

0 comments on commit 330545d

Please sign in to comment.