diff --git a/src/build/Common.gmake b/src/build/Common.gmake
index d19c0851d4f877d695d347e7284d93fdab7d77d6..83c59a5558ea8f1623bd614e691d124c5a0b64d4 100644
--- a/src/build/Common.gmake
+++ b/src/build/Common.gmake
@@ -215,6 +215,10 @@ else
  machine	:=	$(os).$(machine)
 endif
 
+ifeq ($(shell if [ -f /usr/include/inttypes.h ] ; then echo YES ; fi),YES)
+ CFLAGS	+=	-DHAS_INTTYPES_H
+endif
+
 LIBODIR :=	$(CCPRE).$(machine).lib.$(BUILDPATH)
 OBJODIR :=	$(CCPRE).$(machine).obj.$(BUILDPATH)
 MTOBJODIR :=	$(CCPRE).$(machine).obj.$(BUILDPATH)-mt