Skip to content
Snippets Groups Projects
Commit 12b24cf5 authored by deuce's avatar deuce
Browse files

Deal with the Solaris lack of SUN_LEN... use sizeof() instead.

The sizeof acts on THIS:
/*
 * Definitions for UNIX IPC domain.
 */
struct  sockaddr_un {
        sa_family_t     sun_family;             /* AF_UNIX */
        char            sun_path[108];          /* path name (gag) */
};

I second that gag.
parent e5c1fd54
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,11 @@ int spyon(char *sockname) {
spy_name.sun_family=AF_UNIX;
SAFECOPY(spy_name.sun_path,sockname);
#ifdef SUN_LEN
spy_len=SUN_LEN(&spy_name);
#else
spy_len=sizeof(struct sockaddr_un);
#endif
if(connect(spy_sock,(struct sockaddr *)&spy_name,spy_len)) {
return(SPY_NOCONNECT);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment