Skip to content

Instantly share code, notes, and snippets.

@lasombra
lasombra / gist:2039351
Created March 14, 2012 20:40
Weechat on Lion with Xcode 4.3.1 complains about libintl.h
% brew install -v weechat
==> Downloading http://www.weechat.org/files/src/weechat-0.3.7.tar.bz2
File already downloaded in /Users/lasombra/Library/Caches/Homebrew
/usr/bin/tar xf /Users/lasombra/Library/Caches/Homebrew/weechat-0.3.7.tar.bz2
==> cmake -DPREFIX=/Users/lasombra/homebrew/Cellar/weechat/0.3.7 -DENABLE_RUBY=OFF -DENABLE_PERL=OFF -DENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX='/Users/lasombra/homebrew/Cellar/weechat/0.3.7' -DCMAKE_BUILD_TYPE=None -Wno-dev .
cmake -DPREFIX=/Users/lasombra/homebrew/Cellar/weechat/0.3.7 -DENABLE_RUBY=OFF -DENABLE_PERL=OFF -DENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX='/Users/lasombra/homebrew/Cellar/weechat/0.3.7' -DCMAKE_BUILD_TYPE=None -Wno-dev .
-- The C compiler identification is Clang
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
--- lib/system.c 2012-02-23 11:30:11.000000000 -0200
+++ lib/system.c.patched 2012-02-22 22:47:51.000000000 -0200
@@ -1161,7 +1161,14 @@
int groups_max(void)
{
-#if defined(SYSCONF_SC_NGROUPS_MAX)
+#if defined(DARWINOS)
+ /* On OS X, sysconf(_SC_NGROUPS_MAX) returns 16
+ * due to OS X's group nesting and getgrouplist
@lasombra
lasombra / samba.3.6.1.osx-getgrouplist.patch
Created February 23, 2012 00:45 — forked from angerman/samba.3.6.1.osx-getgrouplist.patch
_SC_NGROUPS_MAX cannot be used with getgrouplist on OS X
--- system.c.orig 2012-02-22 22:46:14.000000000 -0200
+++ system.c 2012-02-22 22:47:51.000000000 -0200
@@ -1161,7 +1161,14 @@
int groups_max(void)
{
-#if defined(SYSCONF_SC_NGROUPS_MAX)
+#if defined(DARWINOS)
+ /* On OS X, sysconf(_SC_NGROUPS_MAX) returns 16
+ * due to OS X's group nesting and getgrouplist