mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[liba] Make sure memset and memcpy are always kept at link time
Works around a bug in GCC
This commit is contained in:
committed by
LeaNumworks
parent
308ab85173
commit
6f7063dfda
@@ -1,5 +1,8 @@
|
||||
#include <string.h>
|
||||
|
||||
// Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51205
|
||||
void * memcpy(void * dst, const void * src, size_t n) __attribute__((externally_visible));
|
||||
|
||||
void * memcpy(void * dst, const void * src, size_t n) {
|
||||
char * destination = (char *)dst;
|
||||
char * source = (char *)src;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include <string.h>
|
||||
|
||||
// Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51205
|
||||
void * memset(void * b, int c, size_t len) __attribute__((externally_visible));
|
||||
|
||||
void * memset(void * b, int c, size_t len) {
|
||||
char * destination = (char *)b;
|
||||
while (len--) {
|
||||
|
||||
Reference in New Issue
Block a user