summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2022-10-14 14:52:22 +1100
committerDamien Miller <djm@mindrot.org>2022-10-14 14:52:22 +1100
commitbc2e480d99613bd59720edae244d1764636544c4 (patch)
treeff81f4d0fc223d5363656730e6fe96d786af880c /openbsd-compat
parent5eb796a369c64f18d55a6ae9b1fa9b35eea237fb (diff)
downloadopenssh-git-bc2e480d99613bd59720edae244d1764636544c4.tar.gz
undef _get{short,long} before redefining
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/getrrsetbyname.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
index cc1f8ae5..73de5e94 100644
--- a/openbsd-compat/getrrsetbyname.c
+++ b/openbsd-compat/getrrsetbyname.c
@@ -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 */
/* ************** */