diff -Naur mariadb-connector-c-3.1.13-src.org/include/ma_global.h mariadb-connector-c-3.1.13-src.sw/include/ma_global.h
--- mariadb-connector-c-3.1.13-src.org/include/ma_global.h	2021-11-23 11:22:25.760000000 +0000
+++ mariadb-connector-c-3.1.13-src.sw/include/ma_global.h	2021-11-23 11:23:38.230000000 +0000
@@ -137,6 +137,16 @@
 #define FIX_GCC_LINKING_PROBLEM
 #endif
 
+/* egcs 1.1.2 has a problem with memcpy on Sw_64 */
+#if defined(__GNUC__) && defined(__sw_64__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 &&  __GNUC_MINOR__ >= 95))
+#define BAD_MEMCPY
+#endif
+
+/* In Linux-sw_64 we have atomic.h if we are using gcc */
+#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__sw_64__) && (__GNUC__ > 2 || ( __GNUC__ == 2 &&  __GNUC_MINOR__ >= 95)) && !defined(HAVE_ATOMIC_ADD)
+#define HAVE_ATOMIC_ADD
+#define HAVE_ATOMIC_SUB
+#endif
 /* egcs 1.1.2 has a problem with memcpy on Alpha */
 #if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 &&  __GNUC_MINOR__ >= 95))
 #define BAD_MEMCPY
