Lines 103-108
gl_futimens (int fd ATTRIBUTE_UNUSED,
Link Here
|
103 |
if (fd < 0) |
103 |
if (fd < 0) |
104 |
{ |
104 |
{ |
105 |
int result = utimensat (AT_FDCWD, file, timespec, 0); |
105 |
int result = utimensat (AT_FDCWD, file, timespec, 0); |
|
|
106 |
# ifdef __linux__ |
107 |
/* Work around what might be a kernel bug: |
108 |
http://bugzilla.redhat.com/442352 |
109 |
http://bugzilla.redhat.com/449910 |
110 |
It appears that utimensat can mistakenly return 280 rather |
111 |
than 0 to indicate success. |
112 |
FIXME: remove in 2010 or whenever the offending kernels |
113 |
are no longer in common use. */ |
114 |
if (0 < result) |
115 |
errno = ENOSYS; |
116 |
# endif |
106 |
if (result == 0 || errno != ENOSYS) |
117 |
if (result == 0 || errno != ENOSYS) |
107 |
return result; |
118 |
return result; |
108 |
} |
119 |
} |
Lines 110-115
gl_futimens (int fd ATTRIBUTE_UNUSED,
Link Here
|
110 |
#if HAVE_FUTIMENS |
121 |
#if HAVE_FUTIMENS |
111 |
{ |
122 |
{ |
112 |
int result = futimens (fd, timespec); |
123 |
int result = futimens (fd, timespec); |
|
|
124 |
# ifdef __linux__ |
125 |
/* Work around what might be a kernel bug: |
126 |
http://bugzilla.redhat.com/442352 |
127 |
http://bugzilla.redhat.com/449910 |
128 |
It appears that utimens can mistakenly return 280 rather |
129 |
than 0 to indicate success. |
130 |
FIXME: remove in 2010 or whenever the offending kernels |
131 |
are no longer in common use. */ |
132 |
if (0 < result) |
133 |
errno = ENOSYS; |
134 |
# endif |
113 |
if (result == 0 || errno != ENOSYS) |
135 |
if (result == 0 || errno != ENOSYS) |
114 |
return result; |
136 |
return result; |
115 |
} |
137 |
} |