trasher: Include all the necessary headers

Message ID 1347534268-24725-1-git-send-email-martin@martin.st
State Committed
Commit 18d882551718f3e8da2c08ea664b4d0a1205212b
Headers show

Commit Message

Martin Storsjö Sept. 13, 2012, 11:04 a.m.
This fixes building of this tool on mingw32ce.
---
 tools/trasher.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Martin Storsjö Sept. 13, 2012, 11:16 a.m. | #1
On Thu, 13 Sep 2012, Martin Storsjö wrote:

> This fixes building of this tool on mingw32ce.
> ---
> tools/trasher.c |    2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/trasher.c b/tools/trasher.c
> index 11605b8..35625e9 100644
> --- a/tools/trasher.c
> +++ b/tools/trasher.c
> @@ -21,6 +21,8 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <inttypes.h>
> +#include <errno.h>
> +#include <string.h>
>
> static uint32_t state;
> static uint32_t ran(void)
> -- 
> 1.7.9.4

These are required for errno and strerror, FWIW. (I'll amend the commit 
message.)

// Martin
Ronald Bultje Sept. 13, 2012, 2:59 p.m. | #2
Hi,

On Sep 13, 2012 4:16 AM, "Martin Storsjö" <martin@martin.st> wrote:
>
> On Thu, 13 Sep 2012, Martin Storsjö wrote:
>
>> This fixes building of this tool on mingw32ce.
>> ---
>> tools/trasher.c |    2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/tools/trasher.c b/tools/trasher.c
>> index 11605b8..35625e9 100644
>> --- a/tools/trasher.c
>> +++ b/tools/trasher.c
>> @@ -21,6 +21,8 @@
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <inttypes.h>
>> +#include <errno.h>
>> +#include <string.h>
>>
>> static uint32_t state;
>> static uint32_t ran(void)
>> --
>> 1.7.9.4
>
>
> These are required for errno and strerror, FWIW. (I'll amend the commit
message.)

OK.

Ronald

Patch

diff --git a/tools/trasher.c b/tools/trasher.c
index 11605b8..35625e9 100644
--- a/tools/trasher.c
+++ b/tools/trasher.c
@@ -21,6 +21,8 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <inttypes.h>
+#include <errno.h>
+#include <string.h>
 
 static uint32_t state;
 static uint32_t ran(void)