Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit d05d20e

Browse files
catapnigoroll
authored andcommitted
Tolerate when endian.h is symlink to sys/endian.h
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.
1 parent a865812 commit d05d20e

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

lib/libvarnish/vsha256.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@
3333

3434
#ifndef __DARWIN_BYTE_ORDER
3535
# include <endian.h>
36-
# define VBYTE_ORDER __BYTE_ORDER
37-
# define VBIG_ENDIAN __BIG_ENDIAN
36+
# ifdef _BYTE_ORDER
37+
# define VBYTE_ORDER _BYTE_ORDER
38+
# else
39+
# define VBYTE_ORDER __BYTE_ORDER
40+
# endif
41+
# ifdef _BIG_ENDIAN
42+
# define VBIG_ENDIAN _BIG_ENDIAN
43+
# else
44+
# define VBIG_ENDIAN __BIG_ENDIAN
45+
# endif
3846
#else
3947
# define VBYTE_ORDER __DARWIN_BYTE_ORDER
4048
# define VBIG_ENDIAN __DARWIN_BIG_ENDIAN

0 commit comments

Comments
 (0)