summaryrefslogtreecommitdiffstats
path: root/pacredir.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-10-27 23:13:53 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-10-27 23:13:53 +0100
commitfd4d172d1fb22533fd7ade366d3adc96468a2b7e (patch)
tree35b0b02bb5fe81d01b789da35360f8aa1f8b071f /pacredir.c
parent89fabe126f7fd46394e3506e3602d5a19d0f539a (diff)
downloadpacredir-fd4d172d1fb22533fd7ade366d3adc96468a2b7e.tar.gz
pacredir-fd4d172d1fb22533fd7ade366d3adc96468a2b7e.tar.zst
make pacdbserve aware of architecture
Diffstat (limited to 'pacredir.c')
-rw-r--r--pacredir.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pacredir.c b/pacredir.c
index a55f143..7cc19f9 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -24,6 +24,14 @@
#include <curl/curl.h>
#include <microhttpd.h>
+#if defined __x86_64__
+# define ARCH "x86_64"
+#elif defined __i386__
+# define ARCH "i686"
+#else
+# error Unknown architecture!
+#endif
+
#define PAGE307 "<html><head><title>307 temporary redirect</title>" \
"</head><body>307 temporary redirect: " \
"<a href=\"%s\">%s</a></body></html>"
@@ -31,7 +39,7 @@
"</head><body>404 Not Found: %s</body></html>"
#define PORT 7077
#define PACSERVE "_pacserve._tcp"
-#define PACDBSERVE "_pacdbserve._tcp"
+#define PACDBSERVE "_pacdbserve_" ARCH "._tcp"
#define SYNCPATH "/var/lib/pacman/sync"
#define BADTIME 60 * 10