Files
ports/java/tanukiwrapper/patches/patch-src_c_wrapper_c
T
kurt d844465474 Update to 3.6.3 and use jdk 11 to build
* fix misspelled directory name
* clean up patches
* intentionally remove jdk RUN_DEPENDS, applications that use this will
have a RUN_DEPENDS on a jdk
ok sthen@ pascal@ ian@
2025-12-23 00:42:47 +00:00

51 lines
2.2 KiB
Plaintext

add OpenBSD support
Index: src/c/wrapper.c
--- src/c/wrapper.c.orig
+++ src/c/wrapper.c
@@ -107,7 +107,7 @@
#include <sys/errno.h>
#include <sys/fcntl.h>
#elif defined(AIX) || defined(HPUX) || defined(MACOSX)
- #elif defined(FREEBSD)
+ #elif defined(FREEBSD) || defined(OPENBSD)
#include <sys/param.h>
#include <errno.h>
#else /* LINUX */
@@ -7417,7 +7417,7 @@ int wrapperRunCommonInner() {
tz1 = tzname[0];
tz2 = tzname[1];
#endif
-#ifndef FREEBSD
+#if !defined(FREEBSD) && !defined(OPENBSD)
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Timezone: %s (%s) Offset: %ld, hasDaylight: %d"),
tz1, tz2, timezone, daylight);
#else
@@ -8111,7 +8111,7 @@ int checkIfBinary(const TCHAR *filename) {
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Magic number for file %s: 0x%02x%02x%02x%02x"), filename, head[0], head[1], head[2], head[3]);
}
-#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS)
+#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(OPENBSD)
if (head[1] == 'E' && head[2] == 'L' && head[3] == 'F') {
return 1; /*ELF */
#elif defined(AIX)
@@ -10849,7 +10849,7 @@ static int wrapperBuildJavaAdditionals(TCHAR **strings
static int wrapperBuildAutoBits(TCHAR **strings, int index) {
/* See if the auto bits parameter is set. Ignored by all but the following platforms. */
-#if /*defined(WIN32) || defined(LINUX) ||*/ defined(HPUX) || defined(MACOSX) || defined(SOLARIS) || defined(FREEBSD)
+#if /*defined(WIN32) || defined(LINUX) ||*/ defined(HPUX) || defined(MACOSX) || defined(SOLARIS) || defined(FREEBSD) || defined(OPENBSD)
if (wrapperData->javaVersion->major < 9) {
if (getBooleanProperty(properties,
@@ -10864,6 +10864,8 @@ static int wrapperBuildAutoBits(TCHAR **strings, int i
TEXT("wrapper.java.additional.auto_bits.solaris"),
#elif defined(FREEBSD)
TEXT("wrapper.java.additional.auto_bits.freebsd"),
+#elif defined(OPENBSD)
+ TEXT("wrapper.java.additional.auto_bits.openbsd"),
#elif defined(MACOSX)
TEXT("wrapper.java.additional.auto_bits.macosx"),
#endif