diff -Naur autogen-5.18.1-orig/agen5/autogen.h autogen-5.18.1/agen5/autogen.h
--- autogen-5.18.1-orig/agen5/autogen.h	2013-10-04 15:39:39.468800000 +0400
+++ autogen-5.18.1/agen5/autogen.h	2013-10-04 21:48:58.873400000 +0400
@@ -36,7 +36,7 @@
  */
 #ifndef AUTOGEN_BUILD
 #define AUTOGEN_BUILD 1
-#include <stdnoreturn.h>
+//#include <stdnoreturn.h>
 #include "compat/unlocked-io.h"
 
 #include REGEX_HEADER
diff -Naur autogen-5.18.1-orig/agen5/fmemopen.c autogen-5.18.1/agen5/fmemopen.c
--- autogen-5.18.1-orig/agen5/fmemopen.c	2013-10-04 15:39:39.484400000 +0400
+++ autogen-5.18.1/agen5/fmemopen.c	2013-10-04 15:45:57.440200000 +0400
@@ -1,6 +1,8 @@
 #if defined(ENABLE_FMEMOPEN)
 #include <sys/ioctl.h>
 
+# define _IOWR	_LINUX_IOWR
+
 typedef enum {
     FMEMC_INVALID       = 0,
     FMEMC_GET_BUF_ADDR
@@ -20,7 +22,7 @@
 #endif
 
 #define IOCTL_FMEMC_GET_BUF_ADDR \
-    _IOWR('m', FMEMC_GET_BUF_ADDR, fmemc_get_buf_addr_t)
+    _IOWR('m', FMEMC_GET_BUF_ADDR, sizeof(fmemc_get_buf_addr_t))
 
 /**
  * @file fmemopen.c
@@ -57,7 +59,7 @@
 #    include <libio.h>
 #  endif
 
-   typedef off64_t * seek_off_t;
+   typedef off_t * seek_off_t;
    typedef int       seek_ret_t;
 
 #elif defined(HAVE_FUNOPEN)
@@ -364,7 +366,7 @@
     pFMC->next_ix = new_pos;
 
 #ifdef HAVE_FOPENCOOKIE
-    *offset = (off64_t)new_pos;
+    *offset = (off_t)new_pos;
     return 0;
 #else
     return new_pos;
diff -Naur autogen-5.18.1-orig/autoopts/Makefile.am autogen-5.18.1/autoopts/Makefile.am
--- autogen-5.18.1-orig/autoopts/Makefile.am	2013-10-04 15:39:39.546800000 +0400
+++ autogen-5.18.1/autoopts/Makefile.am	2013-10-04 21:57:05.796000000 +0400
@@ -145,7 +145,7 @@
 nodist_libopts_la_SOURCES = libopts.c
 libopts_la_SOURCES        = $(HDRS)
 libopts_la_CFLAGS         = -DPKGDATADIR='"$(pkgdatadir)"' $(AM_CFLAGS)
-libopts_la_LDFLAGS        = -version-info $(LIBOPTS_VER)
+libopts_la_LDFLAGS        = -version-info $(LIBOPTS_VER) -no-undefined
 libopts_la_LIBADD         = $(top_builddir)/snprintfv/libsnprintfv.la
 
 EXTRA_DIST += $(SRC) $(EXTRA_DATA) $(man_MANS) $(DEF_FILES)
