diff --git a/.gitignore b/.gitignore
index 8054ca8..72fb1f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ jna-3.2.7.tar.bz2
/jna-5.2.0-clean.tar.xz
/jna-5.4.0-clean.tar.xz
/jna-5.6.0-clean.tar.xz
+/jna-5.9.0-clean.tar.xz
diff --git a/0005-Fix-duplicate-manifest-entry.patch b/0005-Fix-duplicate-manifest-entry.patch
index 01ea16c..abcefa8 100644
--- a/0005-Fix-duplicate-manifest-entry.patch
+++ b/0005-Fix-duplicate-manifest-entry.patch
@@ -8,10 +8,10 @@ Subject: [PATCH 5/6] Fix duplicate manifest entry
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
-index cecafd0..ad5794e 100644
+index aa5aa00..9deb2b7 100644
--- a/build.xml
+++ b/build.xml
-@@ -586,9 +586,9 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
+@@ -681,9 +681,9 @@ osname=macosx;processor=aarch64
includes="LICENSE,LGPL2.1,AL2.0"
prefix="META-INF"/>
@@ -20,9 +20,9 @@ index cecafd0..ad5794e 100644
-
+
-
-
-
+
+
+
--
2.20.1
diff --git a/0006-Remove-Werror.patch b/0006-Remove-Werror.patch
index 951e600..cfc6c9f 100644
--- a/0006-Remove-Werror.patch
+++ b/0006-Remove-Werror.patch
@@ -8,15 +8,15 @@ Subject: [PATCH 6/6] Remove -Werror
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/native/Makefile b/native/Makefile
-index cb3afed..028c201 100644
+index 34ace68..b97df45 100644
--- a/native/Makefile
+++ b/native/Makefile
-@@ -337,11 +337,11 @@ ifeq ($(CC),gcc)
+@@ -356,11 +356,11 @@ ifeq ($(CC),gcc)
GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f 1 -d '.')
ifneq ($(GCC_MAJOR_VERSION),4)
ifneq ($(GCC_MAJOR_VERSION),3)
-- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable
-+ LOC_CC_OPTS=-Wno-unknown-warning-option -Wno-clobbered -Wno-unused-variable
+- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
++ LOC_CC_OPTS=-Wno-unknown-warning-option -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
endif
endif
else
@@ -26,5 +26,5 @@ index cb3afed..028c201 100644
# Enable 64-bit builds if the arch demands it
--
-2.20.1
+2.31.1
diff --git a/jna.spec b/jna.spec
index 2b17eb0..c382975 100644
--- a/jna.spec
+++ b/jna.spec
@@ -2,8 +2,8 @@
%bcond_without reflections
Name: jna
-Version: 5.6.0
-Release: 4%{?dist}
+Version: 5.9.0
+Release: 1%{?dist}
Summary: Pure Java access to native libraries
# Most of code is dual-licensed under either LGPL 2.1+ only or Apache
# License 2.0. WeakIdentityHashMap.java was taken from Apache CXF,
@@ -45,6 +45,8 @@ BuildRequires: ant-junit
BuildRequires: junit
BuildRequires: libX11-devel
BuildRequires: libXt-devel
+BuildRequires: objectweb-asm
+BuildRequires: hamcrest
%if %{with reflections}
BuildRequires: reflections
%endif
@@ -101,6 +103,8 @@ rm test/com/sun/jna/StructureFieldOrderInspector.java
rm test/com/sun/jna/StructureFieldOrderInspectorTest.java
%endif
ln -s $(xmvn-resolve ant:ant:1.10.5) lib/ant.jar
+ln -s $(xmvn-resolve org.ow2.asm:asm) lib/asm-8.0.1.jar
+ln -s $(xmvn-resolve org.hamcrest:hamcrest-all) lib/hamcrest-core-1.3.jar
cp lib/native/aix-ppc64.jar lib/clover.jar
@@ -148,6 +152,9 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
%changelog
+* Fri Sep 17 2021 Ondrej Dubaj - 5.9.0-1
+- Rebase to version 5.9.0
+
* Thu Jul 22 2021 Fedora Release Engineering - 5.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/sources b/sources
index 55ec522..dab34c1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (jna-5.6.0-clean.tar.xz) = d39877a11cfd76a9c34a6c828dffd997d906c0c6251c5b4356393e563711317239ad104c1870509e137539aed1d27fec0616073ad6e5e5cc386b969cdaa3423a
+SHA512 (jna-5.9.0-clean.tar.xz) = dddd61404e53d6bb20e471a2f205aaf7443f103b409f91594dd16188932c08e2c0305f72e133a1c2bbdbbbf63a8dc7c13f249982d7bce8eb3445c6222cc2589a