Skip to content

Commit

Permalink
tests/netinet: push variable 'sin' into function scope
Browse files Browse the repository at this point in the history
This should fix build with GCC 13.

Fixes:	861274c
  • Loading branch information
glebius authored and bsdjhb committed Aug 1, 2024
2 parents c012736 + 70f5c6e commit 5d3f6b4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/sys/netinet/tcp_implied_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@

#include <atf-c.h>

static struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_len = sizeof(sin),
};

static const char buf[] = "hello";
static char repl[sizeof(buf)];

ATF_TC_WITHOUT_HEAD(tcp_implied_connect);
ATF_TC_BODY(tcp_implied_connect, tc)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_len = sizeof(sin),
};
const char buf[] = "hello";
char repl[sizeof(buf)];
socklen_t len;
int s, c, a;

Expand Down

0 comments on commit 5d3f6b4

Please sign in to comment.