Skip to content

Commit

Permalink
endian_h
Browse files Browse the repository at this point in the history
  • Loading branch information
epsilon-0 committed Sep 4, 2024
1 parent dcfaba5 commit cceba7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ if have_endian_h
add_project_arguments('-DHAVE_ENDIAN_H', language: 'c')
endif

have_machine_endian_h = compiler.has_header('machine/endian.h')
if have_machine_endian_h
add_project_arguments('-DHAVE_MACHINE_ENDIAN_H', language: 'c')
endif

have_explicit_bzero = compiler.has_function('explicit_bzero')
if have_explicit_bzero
add_project_arguments('-DHAVE_EXPLICIT_BZERO', language: 'c')
Expand Down
4 changes: 4 additions & 0 deletions src/imsg-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#include <endian.h>
#endif

#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif

#include "_imsg_compat.h"
#include "imsg.h"

Expand Down

0 comments on commit cceba7c

Please sign in to comment.