diff --git a/src/modules/Image/encodings/avs.c b/src/modules/Image/encodings/avs.c
index 4cb95b457c8f922962fffb7684064329e0ab2592..65bcedc004457dfb3f65d46d2043618facd258ef 100644
--- a/src/modules/Image/encodings/avs.c
+++ b/src/modules/Image/encodings/avs.c
@@ -1,11 +1,12 @@
 #include "global.h"
-
+#include "config.h"
 #include <math.h>
 #include <ctype.h>
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
-
+#endif
 #include "stralloc.h"
-RCSID("$Id: avs.c,v 1.2 1999/04/15 02:40:08 per Exp $");
+RCSID("$Id: avs.c,v 1.3 1999/05/06 23:44:23 neotron Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
diff --git a/src/modules/Image/encodings/psd.c b/src/modules/Image/encodings/psd.c
index c1fb6f9f8087328e26daa6bcfbad814402fedd2f..2531f987af6052db2da9861c9b6810924bd249b4 100644
--- a/src/modules/Image/encodings/psd.c
+++ b/src/modules/Image/encodings/psd.c
@@ -1,5 +1,5 @@
 #include "global.h"
-RCSID("$Id: psd.c,v 1.7 1999/05/02 08:02:29 hubbe Exp $");
+RCSID("$Id: psd.c,v 1.8 1999/05/06 23:44:24 neotron Exp $");
 
 #include "config.h"
 
@@ -24,7 +24,9 @@ RCSID("$Id: psd.c,v 1.7 1999/05/02 08:02:29 hubbe Exp $");
 
 #include "image.h"
 #include "colortable.h"
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
 
 extern struct program *image_colortable_program;
 extern struct program *image_program;