Menu

#413 WIN32: MSVC: gettimeofday() is unsupported.

v3.x
closed-accepted
gpz
None
bugfix
2025-11-30
2025-11-29
No

Unfortunately, src/screenshot.c cannot be compiled on MSVC because:

  • sys/time.h is unsupported.
  • gettimeofday() is also unsupported.
    Both conditions are already tested by configure script, so I just needed to add some #ifdef...#endif.
    However, it seems to me that a replacement doesn't exists, so I did the patch but I left it open for additional development.
1 Attachments

Discussion

  • gpz

    gpz - 2025-11-29

    While this fix makes it build.... it results in non working behaviour (screenshots will overwrite each other). Perhaps instead of the current time, a simple counter can be added to prevent this?

     
  • gpz

    gpz - 2025-11-30

    slightly modified patch applied in r45878, thanks!

     
  • gpz

    gpz - 2025-11-30
    • status: open --> closed-accepted
    • assigned_to: gpz
     

Log in to post a comment.

MongoDB Logo MongoDB