Skip to content

Commit 3a833a7

Browse files
author
Iheanyi Ekechukwu
committed
Fixes for compiling on AIX.
1 parent 6a582ce commit 3a833a7

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class : $(SRC)/org/xerial/s
5656
$(JAVAC) -source 1.6 -target 1.6 -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
5757

5858
$(SRC)/org/xerial/snappy/SnappyNative.h: $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class
59-
$(JAVAH) -force -classpath $(TARGET)/classes -o $@ org.xerial.snappy.SnappyNative
59+
$(JAVAH) -force -classpath $(TARGET)/jni-classes -o $@ org.xerial.snappy.SnappyNative
6060

6161
ifndef USE_GIT
6262
$(SNAPPY_SRC): $(SNAPPY_UNPACKED)

Makefile.common

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ CROSS_PREFIX :=
6666
Default_CXX := $(CROSS_PREFIX)g++
6767
Default_STRIP := $(CROSS_PREFIX)strip
6868
Default_CXXFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden
69-
Default_LINKFLAGS := -shared -static
69+
Default_LINKFLAGS := -shared -static -lcrypt
7070
Default_LIBNAME := libsnappyjava.so
7171
Default_SNAPPY_FLAGS :=
7272

src/main/java/org/xerial/snappy/OSInfo.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ else if (osName.contains("Mac")) {
140140
else if (osName.contains("Linux")) {
141141
return "Linux";
142142
}
143-
else {
143+
144+
145+
else if ( osName.contains("AIX")) {
146+
return "AIX";
147+
}
148+
else {
144149
return osName.replaceAll("\\W", "");
145150
}
146151
}
Binary file not shown.

0 commit comments

Comments
 (0)