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
32
33
34
35
36
37
38
39
40
41
|
Title: Building under Termux half-fails
Author: Usinganame
Created: Sun, 03 Mar 2024 17:10:42 +0000
State: closed
When running make, it generates various warnings and an error. Apparently it has an undeclared function "bzero". It still compiles though, the binary is in the src/ directory and it's runnable. It works for the most part except for downloads.
I tried to fix it myself by putting
`#include <strings.h>`
Into dpid.c.
That still doesn't work. When I ran configure it stated that I have strings.h, so why won't it work?
Here is the specific error generated by make

--%--
From: rodarima
Date: Sun, 03 Mar 2024 17:21:28 +0000
Good catch.
The `bzero()` function has been deprecated in POSIX.1-2001 and removed from POSIX.1-2008, we shouldn't be using it.
Replace bzero() call in line 82 by:
```c
memset(&serv_addr, 0, sizeof(serv_addr));
```
There is another one in line 101, which should be:
```c
memset(buffer, 0, 256);
```
Let's see if that fixes it.
> It still compiles though, the binary is in the src/ directory and it's runnable.
Well, it compiles first src/dillo, but fails to build the dpid program (and stops) which is used to comunicate with the plugins.
|