hurd: Use __trivfs_server_name instead of trivfs_server_name

The latter violates namespace contraints
This commit is contained in:
Samuel Thibault 2022-01-01 17:51:18 +01:00
parent 35cf8a85ed
commit edb5ab841a

View file

@ -21,7 +21,7 @@
#include <unistd.h> #include <unistd.h>
#include <not-cancel.h> #include <not-cancel.h>
extern char *trivfs_server_name __attribute__((weak)); extern char *__trivfs_server_name __attribute__((weak));
/* Write up to LENGTH bytes of randomness starting at BUFFER. /* Write up to LENGTH bytes of randomness starting at BUFFER.
Return the number of bytes written, or -1 on error. */ Return the number of bytes written, or -1 on error. */
@ -33,14 +33,14 @@ __getrandom (void *buffer, size_t length, unsigned int flags)
size_t amount_read; size_t amount_read;
int fd; int fd;
if (&trivfs_server_name && trivfs_server_name if (&__trivfs_server_name && __trivfs_server_name
&& trivfs_server_name[0] == 'r' && __trivfs_server_name[0] == 'r'
&& trivfs_server_name[1] == 'a' && __trivfs_server_name[1] == 'a'
&& trivfs_server_name[2] == 'n' && __trivfs_server_name[2] == 'n'
&& trivfs_server_name[3] == 'd' && __trivfs_server_name[3] == 'd'
&& trivfs_server_name[4] == 'o' && __trivfs_server_name[4] == 'o'
&& trivfs_server_name[5] == 'm' && __trivfs_server_name[5] == 'm'
&& trivfs_server_name[6] == '\0') && __trivfs_server_name[6] == '\0')
/* We are random, don't try to read ourselves! */ /* We are random, don't try to read ourselves! */
return length; return length;