Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2026 12:18:37 +0000
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f286c2ebbbd8 - main - databases/fastdb: fix build
Message-ID:  <699c459d.3e54d.7d86b390@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f286c2ebbbd83a4ad157704f81c2a3cc12a41784

commit f286c2ebbbd83a4ad157704f81c2a3cc12a41784
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-02-23 12:16:50 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-02-23 12:18:28 +0000

    databases/fastdb: fix build
    
    This port does some strange stuff, like undefining BYTE_ORDER macro,
    because of which it fails to build:
    In file included from src/unisock.cpp:28:
    /usr/include/netinet/tcp.h: In function 'uint16_t __tcp_get_flags(const tcphdr*)':
    /usr/include/netinet/tcp.h:85:32: error: 'const struct tcphdr' has no member named 'th_x2'
       85 |         return (((uint16_t)th->th_x2 << 8) | th->th_flags);
          |                                ^~~~~
    /usr/include/netinet/tcp.h: In function 'void __tcp_set_flags(tcphdr*, uint16_t)':
    /usr/include/netinet/tcp.h:91:13: error: 'struct tcphdr' has no member named 'th_x2'
       91 |         th->th_x2 = (flags >> 8) & 0x0f;
          |             ^~~~~
---
 databases/fastdb/Makefile                    |  4 +++-
 databases/fastdb/files/patch-inc_stdtp.h     | 24 ++++++++++++++++++++++++
 databases/fastdb/files/patch-makefile        | 16 ++++++++--------
 databases/fastdb/files/patch-src_unisock.cpp | 10 ++++++++++
 4 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/databases/fastdb/Makefile b/databases/fastdb/Makefile
index 1ec61394d208..4a6c4bfaf774 100644
--- a/databases/fastdb/Makefile
+++ b/databases/fastdb/Makefile
@@ -15,7 +15,9 @@ USE_GCC=	yes
 MAKE_ENV=	OSTYPE="${OPSYS}"
 MAKEFILE=	makefile
 USE_LDCONFIG=	yes
-DOS2UNIX_FILES=	${MAKEFILE}
+DOS2UNIX_FILES=	${MAKEFILE} \
+		inc/stdtp.h \
+		src/unisock.cpp
 CXXFLAGS+=	-D_WANT_SEMUN
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
diff --git a/databases/fastdb/files/patch-inc_stdtp.h b/databases/fastdb/files/patch-inc_stdtp.h
new file mode 100644
index 000000000000..55231af64c76
--- /dev/null
+++ b/databases/fastdb/files/patch-inc_stdtp.h
@@ -0,0 +1,24 @@
+--- inc/stdtp.h.orig	2026-02-23 10:44:29 UTC
++++ inc/stdtp.h
+@@ -339,21 +339,6 @@ typedef double real8; 
+  
+ #define MAX_NAT8  nat8(-1)
+ 
+-#ifndef BIG_ENDIAN
+-#define BIG_ENDIAN      4321    /* most-significant byte first (IBM, net) */
+-#endif
+-#ifndef LITTLE_ENDIAN
+-#define LITTLE_ENDIAN   1234
+-#endif
+-
+-#ifndef BYTE_ORDER
+-#if defined(__sparc__) || defined(__m68k__)
+-#define BYTE_ORDER      BIG_ENDIAN 
+-#else
+-#define BYTE_ORDER      LITTLE_ENDIAN
+-#endif
+-#endif
+-
+ #ifdef _WIN32
+ typedef HANDLE descriptor_t; 
+ #else
diff --git a/databases/fastdb/files/patch-makefile b/databases/fastdb/files/patch-makefile
index 03beab8ee91d..ba8266f84f0e 100644
--- a/databases/fastdb/files/patch-makefile
+++ b/databases/fastdb/files/patch-makefile
@@ -1,6 +1,6 @@
---- makefile.orig	2014-12-28 21:25:00.000000000 +0200
-+++ makefile	2014-12-28 21:33:28.000000000 +0200
-@@ -8,13 +8,13 @@ DEBUG?=1
+--- makefile.orig	2026-02-23 10:43:46 UTC
++++ makefile
+@@ -8,13 +8,13 @@ PREFIX ?= /usr/local
  PREFIX ?= /usr/local
  
  # Place where to copy FastDB header files
@@ -17,7 +17,7 @@
  
  ifdef NO_PTHREADS
  OBJS = class.o compiler.o database.o xml.o hashtab.o file.o symtab.o ttree.o rtree.o container.o \
-@@ -38,8 +38,8 @@ TFLAGS=-DNO_PTHREADS
+@@ -38,8 +38,8 @@ else
  THRLIBS=
  SUFF=
  else
@@ -28,7 +28,7 @@
  SUFF=_r
  endif
  
-@@ -65,23 +65,23 @@ EXAMPLES = guess testdb testleak testfra
+@@ -65,23 +65,23 @@ WEB_EXAMPLES = cgistub bugdb clidb
  
  WEB_EXAMPLES = cgistub bugdb clidb
  
@@ -57,7 +57,7 @@
  
  AR = ar
  ARFLAGS = -cru
-@@ -439,17 +439,15 @@ examples/TestIndex.class: examples/TestI
+@@ -439,17 +439,15 @@ install: subsql cleanupsem inspectsem installlib
  
  install: subsql cleanupsem inspectsem installlib
  	mkdir -p $(BINSPATH)
@@ -65,11 +65,11 @@
 -	strip $(BINSPATH)/subsql
 -	cp cleanupsem $(BINSPATH)
 -	cp inspectsem $(BINSPATH)
--
 +	${BSD_INSTALL_PROGRAM} subsql $(BINSPATH)
 +	${BSD_INSTALL_PROGRAM} cleanupsem $(BINSPATH)
 +	${BSD_INSTALL_PROGRAM} inspectsem $(BINSPATH)
  
+-
  installlib: $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED)
  	mkdir -p $(INCSPATH)
 -	cp $(INCS) $(INCSPATH)
@@ -80,7 +80,7 @@
  	(cd $(LIBSPATH) && ln -f -s $(FASTDB_SHARED) libfastdb$(SUFF).so \
  	 && ln -f -s $(CLI_SHARED) libcli$(SUFF).so)
  	if [ -f $(JNI_LIB) ]; then cp $(JNI_LIB) $(LIBSPATH); \
-@@ -457,7 +455,7 @@ installlib: $(FASTDB_LIB) $(CLI_LIB) $(F
+@@ -457,7 +455,7 @@ uninstall:
  
  uninstall:
  	rm -fr $(INCSPATH)
diff --git a/databases/fastdb/files/patch-src_unisock.cpp b/databases/fastdb/files/patch-src_unisock.cpp
new file mode 100644
index 000000000000..30696ff693d9
--- /dev/null
+++ b/databases/fastdb/files/patch-src_unisock.cpp
@@ -0,0 +1,10 @@
+--- src/unisock.cpp.orig	2026-02-23 10:43:56 UTC
++++ src/unisock.cpp
+@@ -9,7 +9,6 @@
+ //-------------------------------------------------------------------*--------*
+ 
+ #include "unisock.h"
+-#undef BYTE_ORDER
+ 
+ #ifdef VXWORKS
+ #include "fastdbShim.h"


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?699c459d.3e54d.7d86b390>