Skip to content

Commit

Permalink
libxdp: fix build on musl
Browse files Browse the repository at this point in the history
In musl, PATH_MAX is defined in limits.h. Include it in libxdp.c to fix
building systems using musl libc.

libxdp.c: In function 'find_bpffs':
libxdp.c:406:33: error: 'PATH_MAX' undeclared (first use in this function)
  406 |         static char bpf_wrk_dir[PATH_MAX];
      |                                 ^~~~~~~~

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
  • Loading branch information
stintel authored and tohojo committed Mar 29, 2023
1 parent 344b241 commit a76e7a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/libxdp/libxdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <fcntl.h>
#include <inttypes.h>
#include <dirent.h>
#include <limits.h>

#include <linux/err.h> /* ERR_PTR */
#include <linux/if_link.h>
Expand Down

0 comments on commit a76e7a2

Please sign in to comment.