]> granicus.if.org Git - nethack/commitdiff
added protection in Makefile for cross-compile (although should not happen):
authornhmall <nhmall@nethack.org>
Sun, 24 Nov 2019 17:39:00 +0000 (12:39 -0500)
committernhmall <nhmall@nethack.org>
Sun, 24 Nov 2019 17:39:00 +0000 (12:39 -0500)
src/version.c

index 0ab1d824942bed41bb29b8212c601c23a695f369..099cecb6d69012b90ed02f46867923015a5fc62c 100644 (file)
@@ -44,7 +44,9 @@ const char *NetHack_git_sha
 #if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST))
                 = NETHACK_GIT_SHA
 #else
-                = NETHACK_HOST_GIT_SHA
+#ifdef NETHACK_HOST_GIT_SHA
+               = NETHACK_HOST_GIT_SHA
+#endif
 #endif
 ;
 #endif
@@ -54,8 +56,10 @@ const char *NetHack_git_branch
 #if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST))
                 = NETHACK_GIT_BRANCH
 #else
+#ifdef NETHACK_HOST_GIT_BRANCH
                 = NETHACK_HOST_GIT_BRANCH
 #endif
+#endif
 ;
 #endif