后发现打开ssl网站经常导致goagent崩溃,参考官方Issue
里面也提到了原因是libopenssl线程安全问题
参照
制作一个patch并重新编译替换libopenssl
[jejer@arch openwrt]$ cat openssl.patch
--- package/libs/openssl/Makefile 2013-01-13 08:31:13.693007113 +0800
+++ package/libs/openssl/Makefile.720n 2013-01-12 22:29:33.576217602 +0800
@@ -46,7 +46,7 @@
SECTION:=libs
SUBMENU:=SSL
CATEGORY:=Libraries
- DEPENDS:=+zlib
+ DEPENDS:=+zlib libpthread
TITLE+= (libraries)
MENU:=1
endef
@@ -107,12 +107,13 @@
$(TARGET_CPPFLAGS) \
$(TARGET_LDFLAGS) -ldl \
-DOPENSSL_SMALL_FOOTPRINT \
+ -DOPENSSL_THREADS -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE \
$(OPENSSL_NO_CIPHERS) \
$(OPENSSL_OPTIONS) \
)
endef
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -DOPENSSL_THREADS -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE
define Build/Compile
# XXX: OpenSSL "make depend" will look for installed headers before its own,
[jejer@arch openwrt]$ patch -p0 < openssl.patch
make编译之后直接安装新的bin/ar71xx/packages/libopenssl_1.0.1c-1_ar71xx.ipk即可
没有评论:
发表评论