]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
undef _get{short,long} before redefining
authorDamien Miller <djm@mindrot.org>
Fri, 14 Oct 2022 03:52:22 +0000 (14:52 +1100)
committerDamien Miller <djm@mindrot.org>
Fri, 14 Oct 2022 03:52:22 +0000 (14:52 +1100)
openbsd-compat/getrrsetbyname.c

index cc1f8ae519ebe8747acd2189fa6cf081f4c3f84b..73de5e9482b864653927cb90365f707a2a872c26 100644 (file)
@@ -116,8 +116,14 @@ struct __res_state _res;
 #if !defined(HAVE__GETSHORT) || !defined(HAVE__GETLONG) || \
     !defined(HAVE_DECL__GETSHORT) || HAVE_DECL__GETSHORT == 0 || \
     !defined(HAVE_DECL__GETLONG) || HAVE_DECL__GETLONG == 0
-#define _getshort(x) (_ssh_compat_getshort(x))
-#define _getlong(x) (_ssh_compat_getlong(x))
+# ifdef _getshort
+#  undef _getshort
+# endif
+# ifdef _getlong
+#  undef _getlong
+# endif
+# define _getshort(x) (_ssh_compat_getshort(x))
+# define _getlong(x) (_ssh_compat_getlong(x))
 /*
  * Routines to insert/extract short/long's.
  */
@@ -138,7 +144,7 @@ _getlong(const u_char *msgp)
        GETLONG(u, msgp);
        return (u);
 }
-#endif
+#endif /* missing _getshort/_getlong */
 
 /* ************** */