Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-633

Undefined RTL_RUN_ONCE and suseconds_t with mingw

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.0
    • Affects Version/s: 1.1.4
    • Component/s: Build, libbson, mingw
    • Labels:
      None

      Compiling libbson on Windows with mingw64:

      $ make
      Scanning dependencies of target bson_shared
      [  1%] Building C object CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj
      In file included from C:/Users/vagrant/gittmp/libbson/src/bson/bson.h:23:0,
                       from C:/Users/vagrant/gittmp/libbson/src/bson/bcon.h:24,
                       from C:/Users/vagrant/gittmp/libbson/src/bson/bcon.c:24:
      C:/Users/vagrant/gittmp/libbson/src/bson/bson-compat.h:110:9: error: unknown type name 'RTL_RUN_ONCE'
       typedef RTL_RUN_ONCE INIT_ONCE;
               ^
      In file included from C:/Users/vagrant/gittmp/libbson/src/bson/bson.h:34:0,
                       from C:/Users/vagrant/gittmp/libbson/src/bson/bcon.h:24,
                       from C:/Users/vagrant/gittmp/libbson/src/bson/bcon.c:24:
      C:/Users/vagrant/gittmp/libbson/src/bson/bson-iter.h: In function 'bson_iter_timeval_unsafe':
      C:/Users/vagrant/gittmp/libbson/src/bson/bson-iter.h:394:18: error: 'suseconds_t' undeclared (first use in this function)
          tv->tv_sec = (suseconds_t) (value / 1000);
                        ^
      C:/Users/vagrant/gittmp/libbson/src/bson/bson-iter.h:394:18: note: each undeclared identifier is reported only once for each function it appears in
      CMakeFiles/bson_shared.dir/build.make:54: recipe for target 'CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj' failed
      make[2]: *** [CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj] Error 1
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: