diff -Nru g2lib-3.1.0-orig/addfield.f g2lib-3.1.0/addfield.f
--- g2lib-3.1.0-orig/addfield.f	2020-11-11 19:26:14.905380054 +0100
+++ g2lib-3.1.0/addfield.f	2020-11-11 19:26:27.317394904 +0100
@@ -119,7 +119,7 @@
       integer lensec3,lensec4,lensec5,lensec6,lensec7
       logical issec3,needext,isprevbmap
 
-      allones=Z'FFFFFFFF'
+      allones=int(Z'FFFFFFFF')
       ierr=0
 !
 ! Check to see if beginning of GRIB message exists
