PostgreSQL: build uuid-ossp with _XOPEN_SOURCE.

Fixes build on Mountain Lion

Fixes Homebrew/homebrew#10315.
Fixes Homebrew/homebrew#13639.
Closes Homebrew/homebrew#13803.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Steven Schlansker 2012-07-30 18:39:51 -07:00 committed by Adam Vandenberg
parent 072a8b98f6
commit 918d28c266

View file

@ -21,8 +21,9 @@ class Postgresql < Formula
skip_clean :all
# Fix PL/Python build: https://github.com/mxcl/homebrew/issues/11162
# Fix uuid-ossp build issues: http://archives.postgresql.org/pgsql-general/2012-07/msg00654.php
def patches
# Fix PL/Python build: https://github.com/mxcl/homebrew/issues/11162
DATA
end
@ -218,3 +219,14 @@ __END__
endif
# If we don't have a shared library and the platform doesn't allow it
--- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700
+++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700
@@ -9,6 +9,8 @@
*-------------------------------------------------------------------------
*/
+#define _XOPEN_SOURCE
+
#include "postgres.h"
#include "fmgr.h"
#include "utils/builtins.h"