setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &sz, sizeof(sz));
if(bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
printf("%s bind failed: %s", __func__, strerror(errno));
close(s);
return -1;
}
OUTPUT: open_uevent bind failed: Address already in use
Can anyone help with this?
Thanks