Changeset 720f7a9 for lib


Ignore:
Timestamp:
2016-05-01T01:46:21Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
72d48b6
Parents:
a244877
Message:

ssl_gnutls: Replace GNUTLS_STUPID_CAST with (long)

That's what the gnutls code itself uses, in all platforms.

There's a newer method that does this in a cleaner way, but it's not
supported in all the gnutls versions that bitlbee works with, so this is
simpler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ssl_gnutls.c

    ra244877 r720f7a9  
    4242#include <limits.h>
    4343
    44 #if defined(ULONG_MAX) && ULONG_MAX > 4294967295UL
    45 #define GNUTLS_STUPID_CAST (long)
    46 #else
    47 #define GNUTLS_STUPID_CAST (int)
    48 #endif
    49 
    5044#define SSLDEBUG 0
    5145
     
    335329
    336330        sock_make_nonblocking(conn->fd);
    337         gnutls_transport_set_ptr(conn->session, (gnutls_transport_ptr_t) GNUTLS_STUPID_CAST conn->fd);
     331        gnutls_transport_set_ptr(conn->session, (gnutls_transport_ptr_t) (long) conn->fd);
    338332
    339333        ssl_cache_resume(conn);
Note: See TracChangeset for help on using the changeset viewer.