-# if @HAVE_INCLUDE_NEXT@
-# include_next <netinet/in.h>
-# else
-# include @ABSOLUTE_NETINET_IN_H@
-# endif
-#else
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@
+
+#endif
+
+#ifndef _GL_NETINET_IN_H
+#define _GL_NETINET_IN_H
+
+#if !@HAVE_NETINET_IN_H@