the problem was me creating my own sockaddr_un I though I can create my own structure and I was wrong I though that since in the man page there was
The actual structure passed for the addr argument will depend on the address family. The sockaddr structure is defined as something like:
struct sockaddr {
sa_family_t sa_family;
char sa_data[14];
}
The only purpose of this structure is to cast the structure pointer passed in addr in order to avoid compiler warnings. See EXAMPLE below.
(IDK how to accept the comments as awnswers I will if I could)