Fixes for C++ Winelib compilation.

diff --git a/include/xmalloc.h b/include/xmalloc.h
index 78c355c..e909cb8 100644
--- a/include/xmalloc.h
+++ b/include/xmalloc.h
@@ -1,9 +1,17 @@
 #ifndef __WINE_XMALLOC_H
 #define __WINE_XMALLOC_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void *xmalloc( int size );
 void *xcalloc( int size );
 void *xrealloc( void *ptr, int size );
 char *xstrdup( const char *str );
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* __WINE_XMALLOC_H */