mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
- Fix build on amd64
PR: ports/115384 Submitted by: Robert Noland <rnoland at 2hip.net> (maintainer)
This commit is contained in:
parent
bf36b9b539
commit
72897abddb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=197469
@ -19,6 +19,8 @@ COMMENT= Standard Widget Toolkit for Java
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
|
||||
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-${ARCH}-os.c
|
||||
|
||||
SWT_VERSION= 3346
|
||||
OUTPUT_JAR= swt-devel.jar
|
||||
|
||||
|
20
x11-toolkits/swt-devel/files/extra-patch-amd64-os.c
Normal file
20
x11-toolkits/swt-devel/files/extra-patch-amd64-os.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- os.c.orig 2007-06-25 16:06:14.000000000 -0400
|
||||
+++ os.c 2007-08-10 11:54:37.000000000 -0400
|
||||
@@ -17397,11 +17397,16 @@
|
||||
jlong rc = 0;
|
||||
OS_NATIVE_ENTER(env, that, realpath_FUNC);
|
||||
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
|
||||
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
|
||||
+ if (arg1) {
|
||||
+ if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
|
||||
+ } else
|
||||
+ lparg1 = malloc(PATH_MAX);
|
||||
rc = (jlong)realpath((const char *)lparg0, (char *)lparg1);
|
||||
fail:
|
||||
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
|
||||
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
|
||||
+ if (!arg1 && lparg1 && rc == 0)
|
||||
+ free(lparg1);
|
||||
OS_NATIVE_EXIT(env, that, realpath_FUNC);
|
||||
return rc;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
--- ./os.c 2007-07-22 11:53:22.000000000 +0400
|
||||
+++ ./os.c 2007-07-22 11:57:56.000000000 +0400
|
||||
--- os.c.orig 2007-04-26 14:03:00.000000000 -0400
|
||||
+++ os.c 2007-08-10 11:56:22.000000000 -0400
|
||||
@@ -17397,11 +17397,16 @@
|
||||
jint rc = 0;
|
||||
OS_NATIVE_ENTER(env, that, realpath_FUNC);
|
||||
@ -18,4 +18,3 @@
|
||||
OS_NATIVE_EXIT(env, that, realpath_FUNC);
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user