comparison gtk4/dw.c @ 2904:2b7babf491e1

Solaris: Fix warning because getpid() returns a long int. Not sure if all versions return long or not... so cast to long just in case older versions return int.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 25 Dec 2022 08:38:46 +0000
parents 761b7a12b079
children 3fe7641f027c
comparison
equal deleted inserted replaced
2903:9fd16f694a77 2904:2b7babf491e1
1520 1520
1521 if(sysctl(name, 4, path, &length, NULL, 0) == -1 || length <= 1) 1521 if(sysctl(name, 4, path, &length, NULL, 0) == -1 || length <= 1)
1522 #elif defined(__sun__) 1522 #elif defined(__sun__)
1523 char procpath[101] = {0}; 1523 char procpath[101] = {0};
1524 1524
1525 snprintf(procpath, 100, "/proc/%d/path/a.out", getpid()); 1525 snprintf(procpath, 100, "/proc/%ld/path/a.out", (long)getpid());
1526 1526
1527 if(readlink(procpath, path, PATH_MAX) == -1) 1527 if(readlink(procpath, path, PATH_MAX) == -1)
1528 #endif 1528 #endif
1529 strncpy(path, arg ? arg : "", PATH_MAX); 1529 strncpy(path, arg ? arg : "", PATH_MAX);
1530 1530