diff -ru luasec-0.5.1/src/ssl.c luasec-0.5.1-fixed/src/ssl.c
--- luasec-0.5.1/src/ssl.c	2015-11-20 22:39:32.000000000 +0100
+++ luasec-0.5.1-fixed/src/ssl.c	2016-03-02 15:48:09.439005988 +0100
@@ -395,24 +395,30 @@
   }
   return 1;
 }
-  
+
 /**
  * Return the compression method used.
  */
 static int meth_compression(lua_State *L)
 {
+#if !defined(OPENSSL_NO_COMP)
   const COMP_METHOD *comp;
+#endif
   p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
   if (ssl->state != LSEC_STATE_CONNECTED) {
     lua_pushnil(L);
     lua_pushstring(L, "closed");
     return 2;
   }
+#if !defined(OPENSSL_NO_COMP)
   comp = SSL_get_current_compression(ssl->ssl);
   if (comp)
     lua_pushstring(L, SSL_COMP_get_name(comp));
   else
     lua_pushnil(L);
+#else
+  lua_pushnil(L);
+#endif
   return 1;
 }
 
Only in luasec-0.5.1-fixed/src: ssl.c.orig
