Skip to content

Commit 325aeb4

Browse files
committed
Install a hopefully-temporary workaround for Snow Leopard readdir() bug.
If Apple doesn't fix that reasonably soon, we'll have to consider back-patching a workaround; but for now, just hack it in HEAD so that we can get buildfarm reports on HEAD from OS X machines. Per Jan Otto.
1 parent 762140f commit 325aeb4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/backend/commands/tablespace.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.61 2009/01/22 20:16:02 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.62 2009/09/12 15:51:52 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -612,6 +612,17 @@ remove_tablespace_directories(Oid tablespaceoid, bool redo)
612612
subfile)));
613613

614614
pfree(subfile);
615+
616+
/*
617+
* OS X 10.6 and 10.6.1 have a bug in readdir() that causes the
618+
* next call to fail after deleting the current element. Hopefully
619+
* that will be fixed real soon, but for the moment we have this
620+
* ugly kluge to restart the directory scan.
621+
*/
622+
#ifdef __darwin__
623+
FreeDir(dirdesc);
624+
dirdesc = AllocateDir(location);
625+
#endif
615626
}
616627

617628
FreeDir(dirdesc);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy