summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose dos Santos Junior <j.s.junior@live.com>2018-12-12 05:19:14 +0000
committerDmitry Bogatov <KAction@debian.org>2018-12-12 05:19:14 +0000
commit0b865abc410526ae825d8fd94403630b329d8aa0 (patch)
tree80256ca4f60334f9ac23c63bb418f4072e3e014e
parent7b27cd8c17f5fefdf4240a3922579d4b61f8964c (diff)
include missing headers to ensure proper declarations
mini_httpd uses several standard C functions without including the proper headers needed to pick up their declarations. One of these functions, crypt(), returns a pointer. Failure to include the header means the return type is assumed to be an int, which means the pointer is implicitly cast to an int, which loses data on 64-bit architectures. Author: Steve Langasek <steve.langasek@ubuntu.com> Last-Update: 2016-04-03Index: mini-httpd-1.23/htpasswd.c =================================================================== Gbp-Pq: Name fix-autobuilders
-rw-r--r--htpasswd.c1
-rw-r--r--mini_httpd.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/htpasswd.c b/htpasswd.c
index 31ac769..5a3ab8c 100644
--- a/htpasswd.c
+++ b/htpasswd.c
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
+#include <crypt.h>
#define LF 10
#define CR 13
diff --git a/mini_httpd.c b/mini_httpd.c
index ed963f0..d5ce4fd 100644
--- a/mini_httpd.c
+++ b/mini_httpd.c
@@ -52,6 +52,8 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <dirent.h>
+#include <crypt.h>
+#include <grp.h>
#include "port.h"
#include "match.h"