summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/decimal.h8
-rw-r--r--include/my_pthread.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/include/decimal.h b/include/decimal.h
index 935d341437d..2adeb824318 100644
--- a/include/decimal.h
+++ b/include/decimal.h
@@ -16,6 +16,10 @@
#ifndef _decimal_h
#define _decimal_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
decimal_round_mode;
@@ -112,5 +116,9 @@ void max_decimal(int precision, int frac, decimal_t *to);
#define E_DEC_ERROR 31
#define E_DEC_FATAL_ERROR 30
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 1b7d289b2ef..374529c573a 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -86,10 +86,12 @@ typedef volatile LONG my_pthread_once_t;
#define MY_PTHREAD_ONCE_INPROGRESS 1
#define MY_PTHREAD_ONCE_DONE 2
+#if !STRUCT_TIMESPEC_HAS_TV_SEC || !STRUCT_TIMESPEC_HAS_TV_NSEC
struct timespec {
time_t tv_sec;
long tv_nsec;
};
+#endif
int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);