PyErr_Warn is deprecated in 2.5 - goes away for 3.0
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 61ac4e6..d710a73 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -5344,8 +5344,9 @@
     if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx))
         return NULL;
 
-    if (PyErr_Warn(PyExc_RuntimeWarning,
-		  "tempnam is a potential security risk to your program") < 0)
+    if (PyErr_WarnEx(PyExc_RuntimeWarning,
+		     "tempnam is a potential security risk to your program",
+		     1) < 0)
 	    return NULL;
 
 #ifdef MS_WINDOWS
@@ -5391,8 +5392,9 @@
     char buffer[L_tmpnam];
     char *name;
 
-    if (PyErr_Warn(PyExc_RuntimeWarning,
-		  "tmpnam is a potential security risk to your program") < 0)
+    if (PyErr_WarnEx(PyExc_RuntimeWarning,
+		     "tmpnam is a potential security risk to your program",
+		     1) < 0)
 	    return NULL;
 
 #ifdef USE_TMPNAM_R