diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2024-06-18 22:22:50 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-07-01 07:07:49 -0400 |
commit | e674c91b6528092c8402b32e6aa5ef9234356be1 (patch) | |
tree | b186c4b9bcc6adb774d1c759a3a33475a9fd7bbb | |
parent | abfa203aa6ec8a93d636f362b2ab2166d9952c98 (diff) | |
download | meta-security-e674c91b6528092c8402b32e6aa5ef9234356be1.tar.gz |
{tcp,udp}-smack-test: fix few more implicit-function-declaration issues fatal with gcc-14
tcp-smack-test:
tcp_server.c: In function 'main':
tcp_server.c:50:16: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
50 | port = atoi(argv[1]);
| ^~~~
tcp_server.c:62:12: error: implicit declaration of function 'fsetxattr' [-Wimplicit-function-declaration]
62 | if(fsetxattr(sock, attr_in, label_in, strlen(label_in),0) < 0)
| ^~~~~~~~~
udp-smack-test:
udp_client.c: In function 'main':
udp_client.c:52:12: error: implicit declaration of function 'fsetxattr' [-Wimplicit-function-declaration]
52 | if(fsetxattr(sock, attr, label, strlen(label),0) < 0)
| ^~~~~~~~~
udp_client.c:67:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
67 | close(sock);
| ^~~~~
| pclose
udp_server.c: In function 'main':
udp_server.c:42:16: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
42 | port = atoi(argv[1]);
| ^~~~
udp_server.c:57:12: error: implicit declaration of function 'fsetxattr' [-Wimplicit-function-declaration]
57 | if(fsetxattr(sock, attr, label, strlen(label), 0) < 0)
| ^~~~~~~~~
udp_server.c:84:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
84 | close(sock);
| ^~~~~
| pclose
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | recipes-mac/smack/tcp-smack-test/tcp_server.c | 2 | ||||
-rw-r--r-- | recipes-mac/smack/udp-smack-test/udp_client.c | 2 | ||||
-rw-r--r-- | recipes-mac/smack/udp-smack-test/udp_server.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/recipes-mac/smack/tcp-smack-test/tcp_server.c b/recipes-mac/smack/tcp-smack-test/tcp_server.c index 3c8921f..248a5f6 100644 --- a/recipes-mac/smack/tcp-smack-test/tcp_server.c +++ b/recipes-mac/smack/tcp-smack-test/tcp_server.c | |||
@@ -18,8 +18,10 @@ | |||
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
19 | // THE SOFTWARE. | 19 | // THE SOFTWARE. |
20 | #include <stdio.h> | 20 | #include <stdio.h> |
21 | #include <stdlib.h> | ||
21 | #include <sys/socket.h> | 22 | #include <sys/socket.h> |
22 | #include <sys/types.h> | 23 | #include <sys/types.h> |
24 | #include <sys/xattr.h> | ||
23 | #include <errno.h> | 25 | #include <errno.h> |
24 | #include <netinet/in.h> | 26 | #include <netinet/in.h> |
25 | #include <unistd.h> | 27 | #include <unistd.h> |
diff --git a/recipes-mac/smack/udp-smack-test/udp_client.c b/recipes-mac/smack/udp-smack-test/udp_client.c index 976cbdc..00bb548 100644 --- a/recipes-mac/smack/udp-smack-test/udp_client.c +++ b/recipes-mac/smack/udp-smack-test/udp_client.c | |||
@@ -18,8 +18,10 @@ | |||
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
19 | // THE SOFTWARE. | 19 | // THE SOFTWARE. |
20 | #include <sys/socket.h> | 20 | #include <sys/socket.h> |
21 | #include <sys/xattr.h> | ||
21 | #include <stdlib.h> | 22 | #include <stdlib.h> |
22 | #include <stdio.h> | 23 | #include <stdio.h> |
24 | #include <unistd.h> | ||
23 | #include <netinet/in.h> | 25 | #include <netinet/in.h> |
24 | #include <netdb.h> | 26 | #include <netdb.h> |
25 | #include <string.h> | 27 | #include <string.h> |
diff --git a/recipes-mac/smack/udp-smack-test/udp_server.c b/recipes-mac/smack/udp-smack-test/udp_server.c index 7d2fcf5..32b5442 100644 --- a/recipes-mac/smack/udp-smack-test/udp_server.c +++ b/recipes-mac/smack/udp-smack-test/udp_server.c | |||
@@ -18,10 +18,13 @@ | |||
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
19 | // THE SOFTWARE. | 19 | // THE SOFTWARE. |
20 | #include <sys/socket.h> | 20 | #include <sys/socket.h> |
21 | #include <sys/xattr.h> | ||
21 | #include <stdio.h> | 22 | #include <stdio.h> |
23 | #include <stdlib.h> | ||
22 | #include <netinet/in.h> | 24 | #include <netinet/in.h> |
23 | #include <netdb.h> | 25 | #include <netdb.h> |
24 | #include <string.h> | 26 | #include <string.h> |
27 | #include <unistd.h> | ||
25 | 28 | ||
26 | int main(int argc, char* argv[]) | 29 | int main(int argc, char* argv[]) |
27 | { | 30 | { |