---- tempnam.c.orig 2008-11-12 17:08:45.000000000 -0800
-+++ tempnam.c 2008-11-12 17:41:23.000000000 -0800
-@@ -57,35 +57,68 @@ tempnam(dir, pfx)
+--- tempnam.c.orig 2010-10-25 19:45:24.000000000 -0700
++++ tempnam.c 2010-10-25 22:01:51.000000000 -0700
+@@ -53,35 +53,60 @@ tempnam(dir, pfx)
int sverrno;
char *f, *name;
+ }
+#endif /* __DARWIN_UNIX03 */
f = _PATH_TMP;
-+#if __DARWIN_UNIX03
-+ if (access(f, W_OK) < 0) {
-+ f = "./"; /* directory inaccessible */
-+ if (access(f, W_OK) < 0) {
-+ return(NULL);
-+ }
-+ }
-+#endif /* __DARWIN_UNIX03 */
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if ((f = _mktemp(name)))
+ if ((f = _mktemp(name))) {