Skip to content
Snippets Groups Projects
  1. Feb 16, 2025
  2. Feb 03, 2025
    • Samuel Thibault's avatar
      Merge branch 'override' into 'master' · 3aba0129
      Samuel Thibault authored
      meson: add dependency override for libslirp
      
      See merge request !150
      3aba0129
    • Benjamin Gilbert's avatar
      meson: add dependency override for libslirp · fcedbc15
      Benjamin Gilbert authored
      If libslirp is built as a Meson subproject, Meson needs to associate the
      superproject's dependency('slirp') call with our libslirp_libdep variable.
      The slirp.wrap file shipped in Meson wrapdb accomplishes this with:
      
          [provide]
          slirp = libslirp_libdep
      
      But that requires wrapdb to know the name of our libslirp_libdep variable,
      which changed in 04612eb3.
      
      Explicitly bind the pkg-config name 'slirp' to libslirp_libdep.  This will
      allow slirp.wrap to say:
      
          [provide]
          dependency_names = slirp
      
      and avoid hardcoding the variable name.
      fcedbc15
  3. Feb 02, 2025
  4. Jan 30, 2025
  5. Nov 27, 2024
  6. Nov 25, 2024
  7. Nov 19, 2024
  8. Nov 18, 2024
    • B. Scott Michel's avatar
      Prefer g_strerror() to strerror() · 3a4cb5a8
      B. Scott Michel authored
      Use g_strerror() for better cross platform compatibility: glib handles
      the Windows "deprecation" (i.e., use strerror_s instead of strerror),
      fewer warnings at compile time.
      3a4cb5a8
    • B. Scott Michel's avatar
      vmstate.h: Prefer __typeof__ vice typeof · 480e4efd
      B. Scott Michel authored
      Clang masquerading as gcc on macOS (i.e., "gcc") borks on typeof(), but
      happily accepts __typeof__().
      
      N.B., __typeof__ has been accepted by GCC and Clang for a long time, and
      recently MS decided to support it as well.
      480e4efd
  9. Nov 14, 2024
  10. Nov 11, 2024
  11. Nov 01, 2024
  12. Oct 08, 2024
    • Samuel Thibault's avatar
      Restore SlirpAddPollCb, {,un}register_poll_fd · c0916cf0
      Samuel Thibault authored
      as they were before 72f85005 ("socket abstraction: slirp_os_socket"):
      that broke the ABI. Better introduce SlirpAddPollCbSocket,
      {,un}register_poll_socket that people can use instead, and wrappers for
      the old API, for a smooth API/ABI upgrade.
      c0916cf0
  13. Oct 01, 2024
  14. Sep 26, 2024
    • B. Scott Michel's avatar
      socket abstraction: slirp_os_socket · 72f85005
      B. Scott Michel authored and Samuel Thibault's avatar Samuel Thibault committed
      Use a typedef to abstract socket identifiers because Windows just has to
      be different (SOCKET type.) Moreover, SOCKET on Win64 is 64-bits and
      generates copious type slicing warnings.
      
      Other related changes:
      
      - Explicitly cast curtime's assignment to unsigned int to tamp down on
        type slicing warning.
      
      - Ensure that errno.h is always included. Important for Windows, which
        would otherwise #define errno as WSAGetLastError(); errno.h #define-s
        errno as a function, i.e., "*errno()".
      
      - Export slirp_inet_aton() utility function for Win32/64.
      
      - tcpx_listen()
        - WSASetLastError() unnecessary.
        - Use have_valid_socket() to check socket in error cleanup code
          (vs. "s >= 0").
      72f85005
  15. Sep 25, 2024
    • B. Scott Michel's avatar
      tcp_listen: Missing register_poll_fd · 5e97a93b
      B. Scott Michel authored and Samuel Thibault's avatar Samuel Thibault committed
      Bug fix: tcpx_listen() needs to invoke the socket's register_poll_fd()
      callback so that platforms can add the socket to their collection of
      sockets-of-interest (primarily Windows, also platforms that use select()
      and not poll()).
      
      Same for udpx_listen(). Register the created socket!
      
      For Windows, host forwarding "now works gooder!"
      
      The socket is eventually unregistered via the two use cases in which
      tcpx_listen() is used:
      
      - slirp_add_hostfwd, slirp_add_hostxfwd: The corresponding "remove"
        functions (slirp_remove_hostfwd, slirp_remove_hostxfwd) invoke
        unregister_poll_fd().
      
      - TCP emulation (tcp_emu() in tcp_subr.c): All calls to tcp_listen() set
        the SS_FACCEPTONCE flag, making the accept() a one-shot event. By
        carefully examining tcp_subr.c, lines 523-531, one sees that
        tcp_connect() unregisters the one-shot accept().
      
      QED.
      5e97a93b
  16. Aug 04, 2024
  17. Jul 30, 2024
  18. Jun 02, 2024
  19. Jun 01, 2024
    • Biswapriyo Nath's avatar
      windows: allow static linking with LIBSLIRP_STATIC macro · 84361923
      Biswapriyo Nath authored
      When the macro is defined it will help to link with libslirp statically.
      Otherwise, dllimport attribute is added with function symbols and linker
      errors are shown as following for static linking.
      
      undefined reference to `__imp_slirp_input'
      undefined reference to `__imp_slirp_cleanup'
      undefined reference to `__imp_slirp_remove_hostfwd'
      etc.
      84361923
  20. May 12, 2024
Loading