Skip to content

Commit

Permalink
Tolerate when endian.h is symlink to sys/endian.h
Browse files Browse the repository at this point in the history
Since 5a60b36 varnish drop support of
sys/endian.h and they had a bit different API one or two leading `_`.

Some system may have symlink from endian.h to sys/endian.h, for example
OpenBSD. On such system build fails due to wrong SHA256 hash.
  • Loading branch information
catap authored and nigoroll committed Nov 18, 2024
1 parent a865812 commit d05d20e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/libvarnish/vsha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,16 @@

#ifndef __DARWIN_BYTE_ORDER
# include <endian.h>
# define VBYTE_ORDER __BYTE_ORDER
# define VBIG_ENDIAN __BIG_ENDIAN
# ifdef _BYTE_ORDER
# define VBYTE_ORDER _BYTE_ORDER
# else
# define VBYTE_ORDER __BYTE_ORDER
# endif
# ifdef _BIG_ENDIAN
# define VBIG_ENDIAN _BIG_ENDIAN
# else
# define VBIG_ENDIAN __BIG_ENDIAN
# endif
#else
# define VBYTE_ORDER __DARWIN_BYTE_ORDER
# define VBIG_ENDIAN __DARWIN_BIG_ENDIAN
Expand Down

0 comments on commit d05d20e

Please sign in to comment.