linktree Atrinik.org - Multiplayer Online Role Playing Game  >  Community  >  Support
linktree Topic: error: redefinition of 'struct timespec'
Pages: [1]   Go Down
  Print  
Author Topic: error: redefinition of 'struct timespec'  (Read 4699 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« on: August 16, 2015, 01:59:02 am »

Here's a workaround for the following error:
Code: [Select]
c:\mingw\include\parts\time.h:65:8: error: redefinition of 'struct timespec'
c:\mingw\include\pthread.h:320:8: note: originally defined here

In C:\MinGW\include\pthread.h find
Code: [Select]
struct timespec {
        time_t tv_sec;
        long tv_nsec;
};

Replace by:
Code: [Select]
#if !defined(__struct_timespec_defined)
#define __struct_timespec_defined 1
struct timespec {
        time_t tv_sec;
        long tv_nsec;
};
#endif /* __struct_timespec_defined */

Problem solved, for now.

I'd be very happy if someone has a better solution  :?

M.
 Logged
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #1 on: August 16, 2015, 08:44:54 pm »

Fixed in https://github.com/atrinik/atrinik/commit/2183b01903746cec11e075b4a873ff191d4529ad

M.
 Logged
Offline ddhanna
Main Server Mod
Contributor

Posts: 184
Gender: Male
« Reply #2 on: August 17, 2015, 05:36:15 pm »

thanks for the find and quick fix.....  8)
 Logged
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #3 on: August 17, 2015, 05:49:14 pm »

Credits to Cleo for fixing  ;)

M.
 Logged
Offline ddhanna
Main Server Mod
Contributor

Posts: 184
Gender: Male
« Reply #4 on: August 17, 2015, 07:58:29 pm »

He is good at that.... :D
 Logged
Pages: [1]   Go Up
  Print  
 
Jump to: