SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,12 @@
Index: src/Makefile.shlib
--- src/Makefile.shlib.orig
+++ src/Makefile.shlib
@@ -79,7 +79,7 @@ shlib_major = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION
shlib_bare = lib$(NAME)$(DLSUFFIX)
# Testing the soname variable is a reliable way to determine whether a
# linkable library is being built.
-soname = $(shlib_major)
+soname = $(shlib_major).$(SO_MINOR_VERSION)
pkgconfigdir = $(libdir)/pkgconfig
else
# Naming convention for dynamically loadable modules

View file

@ -0,0 +1,29 @@
Use the address family from the address, not from the netmask,
since the latter is unreliable. Fixes "samenet"/"samehost".
Index: src/backend/libpq/ifaddr.c
--- src/backend/libpq/ifaddr.c.orig
+++ src/backend/libpq/ifaddr.c
@@ -200,17 +200,16 @@ run_ifaddr_callback(PgIfAddrCallback callback, void *c
/* Check that the mask is valid */
if (mask)
{
- if (mask->sa_family != addr->sa_family)
+
+ /* mask->sa_family can be different from addr->sa_family. */
+
+ if (addr->sa_family == AF_INET)
{
- mask = NULL;
- }
- else if (mask->sa_family == AF_INET)
- {
if (((struct sockaddr_in *) mask)->sin_addr.s_addr == INADDR_ANY)
mask = NULL;
}
#ifdef HAVE_IPV6
- else if (mask->sa_family == AF_INET6)
+ else if (addr->sa_family == AF_INET6)
{
if (IN6_IS_ADDR_UNSPECIFIED(&((struct sockaddr_in6 *) mask)->sin6_addr))
mask = NULL;

View file

@ -0,0 +1,12 @@
Index: src/bin/scripts/vacuumdb.c
--- src/bin/scripts/vacuumdb.c.orig
+++ src/bin/scripts/vacuumdb.c
@@ -10,6 +10,8 @@
*-------------------------------------------------------------------------
*/
+#include <sys/select.h> /* FD_SETSIZE */
+
#include "postgres_fe.h"
#include "catalog/pg_class_d.h"

View file

@ -0,0 +1,33 @@
Index: src/include/storage/s_lock.h
--- src/include/storage/s_lock.h.orig
+++ src/include/storage/s_lock.h
@@ -763,6 +763,29 @@ typedef unsigned char slock_t;
do { __asm__ __volatile__("" : : : "memory"); *(lock) = 0; } while (0)
#endif
+#if defined(__m88k__) /* Motorola 88k */
+#define HAS_TEST_AND_SET
+
+typedef unsigned int slock_t;
+
+#define TAS(lock) tas(lock)
+
+static __inline__ int
+tas(volatile slock_t *lock)
+{
+ register slock_t _res = 1;
+
+ __asm__ __volatile__(
+ " xmem %0, %2, %%r0\n"
+: "=r"(_res)
+: "0" (_res), "r"(lock)
+: "memory");
+ return (int) _res;
+}
+
+#endif /* __m88k__ */
+
+
#endif /* defined(__GNUC__) || defined(__INTEL_COMPILER) */

View file

@ -0,0 +1,14 @@
Index: src/interfaces/ecpg/compatlib/Makefile
--- src/interfaces/ecpg/compatlib/Makefile.orig
+++ src/interfaces/ecpg/compatlib/Makefile
@@ -15,8 +15,8 @@ include $(top_builddir)/src/Makefile.global
PGFILEDESC = "ECPG compat - compatibility library for ECPG"
NAME= ecpg_compat
-SO_MAJOR_VERSION= 3
-SO_MINOR_VERSION= $(MAJORVERSION)
+SO_MAJOR_VERSION= ${LIBecpg_compat_MAJOR}
+SO_MINOR_VERSION= ${LIBecpg_compat_MINOR}
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS)

View file

@ -0,0 +1,14 @@
Index: src/interfaces/ecpg/ecpglib/Makefile
--- src/interfaces/ecpg/ecpglib/Makefile.orig
+++ src/interfaces/ecpg/ecpglib/Makefile
@@ -15,8 +15,8 @@ include $(top_builddir)/src/Makefile.global
PGFILEDESC = "ECPG - embedded SQL in C"
NAME= ecpg
-SO_MAJOR_VERSION= 6
-SO_MINOR_VERSION= $(MAJORVERSION)
+SO_MAJOR_VERSION= ${LIBecpg_MAJOR}
+SO_MINOR_VERSION= ${LIBecpg_MINOR}
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)

View file

@ -0,0 +1,14 @@
Index: src/interfaces/ecpg/pgtypeslib/Makefile
--- src/interfaces/ecpg/pgtypeslib/Makefile.orig
+++ src/interfaces/ecpg/pgtypeslib/Makefile
@@ -15,8 +15,8 @@ include $(top_builddir)/src/Makefile.global
PGFILEDESC = "pgtypes - library for data type mapping"
NAME= pgtypes
-SO_MAJOR_VERSION= 3
-SO_MINOR_VERSION= $(MAJORVERSION)
+SO_MAJOR_VERSION= ${LIBpgtypes_MAJOR}
+SO_MINOR_VERSION= ${LIBpgtypes_MINOR}
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-DFRONTEND $(CPPFLAGS)

View file

@ -0,0 +1,14 @@
Index: src/interfaces/libpq/Makefile
--- src/interfaces/libpq/Makefile.orig
+++ src/interfaces/libpq/Makefile
@@ -18,8 +18,8 @@ PGFILEDESC = "PostgreSQL Access Library"
# shared library parameters
NAME= pq
-SO_MAJOR_VERSION= 5
-SO_MINOR_VERSION= $(MAJORVERSION)
+SO_MAJOR_VERSION= ${LIBpq_MAJOR}
+SO_MINOR_VERSION= ${LIBpq_MINOR}
override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port -I$(top_srcdir)/src/port
ifneq ($(PORTNAME), win32)