summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Ahern <william@solaris.(none)>2012-09-27 13:11:30 -0700
committerWilliam Ahern <william@solaris.(none)>2012-09-27 13:11:30 -0700
commit7314a6aaddf0984258d5e04b27faee08de314821 (patch)
tree48c3ce632d32f2a4509b6fca3976d777f91ddd33
parent21dfde350145320964f034b0f26543f000de1538 (diff)
downloadluaossl-7314a6aaddf0984258d5e04b27faee08de314821.tar.gz
luaossl-7314a6aaddf0984258d5e04b27faee08de314821.tar.bz2
luaossl-7314a6aaddf0984258d5e04b27faee08de314821.zip
-n
fix solaris build
-rw-r--r--Makefile8
-rw-r--r--openssl.c4
2 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 739b87d..c6f7e4d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,16 @@ VENDOR.CC = $(shell env CC="${CC}" ../mk/vendor.cc)
13 13
14 14
15CPPFLAGS = -I$(DESTDIR)$(lua52include) 15CPPFLAGS = -I$(DESTDIR)$(lua52include)
16
17ifeq ($(VENDOR.CC), sunpro)
18DFLAGS = -g
19CFLAGS = -xcode=pic13 $(DFLAGS)
20CPPFLAGS += -DOPENSSL_NO_EC
21else
16DFLAGS = -g -Wall -Wextra -Wno-deprecated-declarations -Wno-unused 22DFLAGS = -g -Wall -Wextra -Wno-deprecated-declarations -Wno-unused
17CFLAGS = -fPIC $(DFLAGS) 23CFLAGS = -fPIC $(DFLAGS)
24endif
25
18LDFLAGS = -lssl -lcrypto 26LDFLAGS = -lssl -lcrypto
19 27
20ifeq ($(VENDOR.OS), Darwin) 28ifeq ($(VENDOR.OS), Darwin)
diff --git a/openssl.c b/openssl.c
index afae12b..b63e6e0 100644
--- a/openssl.c
+++ b/openssl.c
@@ -789,6 +789,7 @@ creat:
789 789
790 break; 790 break;
791 } 791 }
792#ifndef OPENSSL_NO_EC
792 case EVP_PKEY_EC: { 793 case EVP_PKEY_EC: {
793 EC_GROUP *grp; 794 EC_GROUP *grp;
794 EC_KEY *key; 795 EC_KEY *key;
@@ -821,6 +822,7 @@ creat:
821 822
822 break; 823 break;
823 } 824 }
825#endif
824 default: 826 default:
825 return luaL_error(L, "%d: unknown EVP base type (%d)", EVP_PKEY_type(type), type); 827 return luaL_error(L, "%d: unknown EVP base type (%d)", EVP_PKEY_type(type), type);
826 } /* switch() */ 828 } /* switch() */
@@ -998,6 +1000,7 @@ static int pk_toPEM(lua_State *L) {
998 1000
999 break; 1001 break;
1000 } 1002 }
1003#ifndef OPENSSL_NO_EC
1001 case EVP_PKEY_EC: { 1004 case EVP_PKEY_EC: {
1002 EC_KEY *ec = EVP_PKEY_get1_EC_KEY(key); 1005 EC_KEY *ec = EVP_PKEY_get1_EC_KEY(key);
1003 const EC_GROUP *grp = EC_KEY_get0_group(ec); 1006 const EC_GROUP *grp = EC_KEY_get0_group(ec);
@@ -1011,6 +1014,7 @@ static int pk_toPEM(lua_State *L) {
1011 1014
1012 break; 1015 break;
1013 } 1016 }
1017#endif
1014 default: 1018 default:
1015 return luaL_error(L, "%d: unknown EVP base type", EVP_PKEY_type(key->type)); 1019 return luaL_error(L, "%d: unknown EVP base type", EVP_PKEY_type(key->type));
1016 } 1020 }