Changeset 334 for trunk


Ignore:
Timestamp:
Apr 21, 2011, 2:29:20 PM (13 years ago)
Author:
katerina
Message:

Fix for ticket #234: Spurious warnings about unsupported address family

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_portcheck.c

    r329 r334  
    12731273            perror(_("socket"));
    12741274#else
    1275           SH_MUTEX_LOCK(mutex_thread_nolog);
    1276           sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
    1277                           sh_error_message(errno, errbuf, sizeof(errbuf)), _("socket"));
    1278           SH_MUTEX_UNLOCK(mutex_thread_nolog);
     1275
     1276#ifndef EPROTONOSUPPORT
     1277#define EPROTONOSUPPORT 0
     1278#endif
     1279#ifndef EAFNOSUPPORT
     1280#define EAFNOSUPPORT    0
     1281#endif
     1282          if (errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT)
     1283            {
     1284              SH_MUTEX_LOCK(mutex_thread_nolog);
     1285              sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
     1286                              sh_error_message(errno, errbuf, sizeof(errbuf)), _("socket"));
     1287              SH_MUTEX_UNLOCK(mutex_thread_nolog);
     1288            }
    12791289#endif
    12801290          continue;
     
    13581368            perror(_("socket"));
    13591369#else
    1360           SH_MUTEX_LOCK(mutex_thread_nolog);
    1361           sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
    1362                           sh_error_message(errno, errbuf, sizeof(errbuf)), _("socket"));
    1363           SH_MUTEX_UNLOCK(mutex_thread_nolog);
     1370#ifndef EPROTONOSUPPORT
     1371#define EPROTONOSUPPORT 0
     1372#endif
     1373#ifndef EAFNOSUPPORT
     1374#define EAFNOSUPPORT    0
     1375#endif
     1376          if (errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT)
     1377            {
     1378              SH_MUTEX_LOCK(mutex_thread_nolog);
     1379              sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
     1380                              sh_error_message(errno, errbuf, sizeof(errbuf)), _("socket"));
     1381              SH_MUTEX_UNLOCK(mutex_thread_nolog);
     1382            }
    13641383#endif
    13651384          continue;
Note: See TracChangeset for help on using the changeset viewer.