mirror of
https://codeberg.org/landley/toybox.git
synced 2026-01-26 06:07:55 +00:00
Go back to the #ifdefs to work around compiler regressions.
While both gcc 12.2 and clang 18.0 compiled weak and non-weak versions of the same symbol in the same file just fine, newer versions only work if the weak symbol is in a different compilation unit than the non-weak one. Otherwise they error out on the "redefinition".
This commit is contained in:
parent
5ab6c0d5e2
commit
4bf4509984
@ -57,7 +57,7 @@ void hash_by_name(int fd, char *name, char *result)
|
||||
}
|
||||
|
||||
// Builtin implementations
|
||||
#endif
|
||||
#else
|
||||
|
||||
struct browns {
|
||||
unsigned *rconsttable32;
|
||||
@ -306,7 +306,7 @@ static void hash_update(char *data, unsigned int len,
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((__weak__)) void hash_by_name(int fd, char *name, char *result)
|
||||
void hash_by_name(int fd, char *name, char *result)
|
||||
{
|
||||
unsigned long long count[2];
|
||||
int i, chunksize, digestlen, method;
|
||||
@ -391,3 +391,4 @@ __attribute__((__weak__)) void hash_by_name(int fd, char *name, char *result)
|
||||
for (pp = (void *)libbuf; pp-(unsigned *)libbuf<sizeof(libbuf)/4; pp++)
|
||||
*pp = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user