diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2021-12-26 19:52:31 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2021-12-26 19:52:31 +0100 |
commit | a10a8fb335e5a817e1a9add49ee179394eea67c4 (patch) | |
tree | 70ea95120f4390a6a5f32cda5a8bf1d45e4e0487 /src/main.c | |
parent | 0.0.16, read debian/changelog (diff) | |
download | sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.tar sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.tar.gz sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.tar.bz2 sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.tar.lz sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.tar.xz sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.tar.zst sear.c-a10a8fb335e5a817e1a9add49ee179394eea67c4.zip |
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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" |