Skip to content

Commit 75b6cc7

Browse files
committed
patch for building on centos 7, of course
1 parent 9444215 commit 75b6cc7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SPC/builder/linux/library/imap.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SPC\builder\linux\library;
66

7+
use SPC\builder\linux\SystemUtil;
78
use SPC\exception\FileSystemException;
89
use SPC\exception\RuntimeException;
910
use SPC\store\FileSystem;
@@ -44,16 +45,15 @@ protected function build(): void
4445
} else {
4546
$ssl_options = 'SSLTYPE=none';
4647
}
48+
$ldl = SystemUtil::getLibcVersionIfExists() <= '2.17' ? 'EXTRALDFLAGS="-ldl -lrt -lpthread"' : '';
4749
shell()->cd($this->source_dir)
4850
->exec('make clean')
4951
->exec('touch ip6')
5052
->exec('chmod +x tools/an')
5153
->exec('chmod +x tools/ua')
5254
->exec('chmod +x src/osdep/unix/drivers')
5355
->exec('chmod +x src/osdep/unix/mkauths')
54-
->exec(
55-
"yes | make slx {$ssl_options} EXTRACFLAGS='-fPIC -fpermissive'"
56-
);
56+
->exec("yes | make slx {$ssl_options} EXTRACFLAGS='-fPIC -fpermissive' $ldl");
5757
try {
5858
shell()
5959
->exec("cp -rf {$this->source_dir}/c-client/c-client.a " . BUILD_LIB_PATH . '/libc-client.a')

0 commit comments

Comments
 (0)