$OpenBSD: patch-Modules_socketmodule_c,v 1.2 2004/08/11 08:11:50 xsa Exp $
--- Modules/socketmodule.c.orig	Sun Apr 11 14:10:03 2004
+++ Modules/socketmodule.c	Wed Aug 11 00:07:43 2004
@@ -63,9 +63,6 @@ Local naming conventions:
 
 #include "Python.h"
 
-#undef MAX
-#define MAX(x, y) ((x) < (y) ? (y) : (x))
-
 /* Socket object documentation */
 PyDoc_STRVAR(sock_doc,
 "socket([family[, type[, proto]]]) -> socket object\n\
@@ -2822,7 +2819,7 @@ Convert a 32-bit integer from network to
 static PyObject *
 socket_htons(PyObject *self, PyObject *args)
 {
-	unsigned long x1, x2;
+	int x1, x2;
 
 	if (!PyArg_ParseTuple(args, "i:htons", &x1)) {
 		return NULL;
@@ -2893,7 +2890,7 @@ socket_inet_aton(PyObject *self, PyObjec
 	struct in_addr buf;
 #else
 	/* Have to use inet_addr() instead */
-	unsigned long packed_addr;
+	int packed_addr;
 #endif
 	char *ip_addr;
 
@@ -3024,7 +3021,7 @@ socket_inet_ntop(PyObject *self, PyObjec
 #endif
 	
 	/* Guarantee NUL-termination for PyString_FromString() below */
-	memset((void *) &ip[0], '\0', sizeof(ip) + 1);
+	memset((void *) &ip[0], '\0', sizeof(ip));
 
 	if (!PyArg_ParseTuple(args, "is#:inet_ntop", &af, &packed, &len)) {
 		return NULL;
