---
 demos/unsupported/xmform/xmform.c |    1 +
 lib/Xm/XpmI.h                     |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/lib/Xm/XpmI.h
+++ b/lib/Xm/XpmI.h
@@ -129,7 +129,7 @@ extern "C" {
 extern FILE *popen();
 #endif
 
-#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE)
+#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE) || defined (_POSIX_SOURCE)
 #include <string.h>
 
 #ifndef index
--- a/demos/unsupported/xmform/xmform.c
+++ b/demos/unsupported/xmform/xmform.c
@@ -50,6 +50,7 @@ xmform*topShadowColor:           white
 xmform*bottomShadowColor:        black
 ***-------------------------------------------------------------------*/
 
+#include <stdlib.h>
 #include <Xm/Xm.h>
 #include <Xm/Form.h>
 #include <Xm/PushB.h>
