-
-
Notifications
You must be signed in to change notification settings - Fork 206
Closed
Description
On my version at least (13.0-RELEASE-p7) there is no need to redefine the imports from <sys/endian.h>, it matches the include of OpenBSD. Although it compiles fine, it fails on import (betoh32 undefined). The patch below fixes it for me.
I believe in the source this would be in psycopg_c/psycopg_c/_psycopg/endian.pxd
--- psycopg_c/_psycopg.c.orig 2022-03-08 16:11:25 UTC
+++ psycopg_c/_psycopg.c
@@ -1055,11 +1055,11 @@ typedef enum {
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# define __PDP_ENDIAN PDP_ENDIAN
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__FreeBSD__)
# include <sys/endian.h>
-#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#elif defined(__NetBSD__) || defined(__DragonFly__)
# include <sys/endian.h>
Metadata
Metadata
Assignees
Labels
No labels