summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 6576fb8..32c7e96 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,6 +21,9 @@
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <microhttpd.h>
+#ifndef SC_OLD_STORAGE
+#include <search.h>
+#endif
#include <lib.c>
#include <url.c>
unsigned char sc_hp[] = { /* html page null terminated format string, from file src/hp.html */
@@ -39,7 +42,7 @@ char sc_securitytxt[] = "# This content information is provided by the developer
"Encryption: https://www.sijanec.eu/pgp-key.txt\n"
"Expires: Thu, 31 Dec 2021 18:37:07 -0800\n"
"Preferred-Languages: sl, en, de, hr\n";
-#define SC_HTTP_PORT 7327 /* SEAR on mobile keyboard */
+#define SC_HTTP_PORT (getenv("SC_PORT") ? atoi(getenv("SC_PORT")) : 7327) /* SEAR on mobile keyboard */
#define SC_HTTP_RBUFSIZE 4096 /* initial size of http read buffer, increasning by K */
#define SC_HTTP_USER_AGENT "Nokia WAP Gateway 4.1 CD1/ECD13_D/4.1.04)" /* so google and others sends a minimal response */
#define SC_HTTP_HEADERS "User-Agent: " SC_HTTP_USER_AGENT "\r\n"