File: 28-Fix-gcc-warning.patch

package info (click to toggle)
bsd-mailx 8.1.2-0.20180807cvs-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,036 kB
  • sloc: ansic: 7,013; makefile: 58; sh: 23
file content (31 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Robert Luberda <robert@debian.org>
Date: Thu, 9 Apr 2015 23:34:55 +0200
Subject: 28 Fix gcc warning

Fix the following warning:
lex.c:128:2: warning: implicit declaration of function 'mkostemp' [-Wimplicit-function-declaration]
---
 lex.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lex.c b/lex.c
index c4fbad1..9de095b 100644
--- a/lex.c
+++ b/lex.c
@@ -30,12 +30,16 @@
  * SUCH DAMAGE.
  */
 
+#define _GNU_SOURCE // for mkostemp in stdlib.h
+#include <stdlib.h>
+
 #include "rcv.h"
 #include <errno.h>
 #include <fcntl.h>
 #include "extern.h"
 #include <bsd/err.h>
 
+
 /*
  * Mail -- a mail program
  *