Skip to content

Commit 35ef9bb

Browse files
committed
解决macos 环境 线程屏障 pthread_barrierattr_t 找不到
1 parent b28afc9 commit 35ef9bb

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

sapi/src/builder/extension/swoole.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,13 @@
9999

100100
$p->withExportVariable('SWOOLE_ODBC_LIBS', '$(pkg-config --libs-only-L --libs-only-l --static odbc odbccr odbcinst readline ncursesw ) ' . " -L{$libiconv_prefix}/lib -liconv ");
101101

102-
103-
/*
104102
$p->withBeforeConfigureScript('swoole', function () use ($p) {
105103
$workDir = $p->getWorkDir();
106104
$shell = "set -x ;cd {$workDir} ; WORKDIR={$workDir} ;" . PHP_EOL;
107105
$shell .= <<<'EOF'
108-
109-
SWOOLE_VERSION=$(awk 'NR==1{ print $1 }' "sapi/SWOOLE-VERSION.conf")
110-
CURRENT_SWOOLE_VERSION=''
106+
/*
107+
SWOOLE_VERSION=$(awk 'NR==1{ print $1 }' "sapi/SWOOLE-VERSION.conf")
108+
CURRENT_SWOOLE_VERSION=''
111109
112110
if [ -f "ext/swoole/CMakeLists.txt" ] ;then
113111
CURRENT_SWOOLE_VERSION=$(grep 'set(SWOOLE_VERSION' ext/swoole/CMakeLists.txt | awk '{ print $2 }' | sed 's/)//')
@@ -128,12 +126,15 @@
128126
rm -rf /tmp/swoole/.git/
129127
tar -czvf ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz .
130128
fi
131-
# swoole extension hook
132-
cd {$workDir}
133-
sed -i '' 's/pthread_barrier_init/pthread_barrier_init_x_fake/' ext/swoole/config.m4
129+
fi
130+
*/
131+
# swoole extension hook
132+
cd {$workDir}
133+
sed -i '' 's/pthread_barrier_init/pthread_barrier_init_x_fake/' ext/swoole/config.m4
134+
134135
EOF;
135136

136-
return $shell;
137-
});
138-
*/
137+
return $shell;
138+
});
139+
139140
};

0 commit comments

Comments
 (0)