aboutsummaryrefslogtreecommitdiffstats
path: root/src/constr_SET.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/constr_SET.c')
-rw-r--r--src/constr_SET.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/constr_SET.c b/src/constr_SET.c
index 9b6012f..ecf5661 100644
--- a/src/constr_SET.c
+++ b/src/constr_SET.c
@@ -6,12 +6,6 @@
#include <asn_internal.h>
#include <constr_SET.h>
-#ifndef WIN32
-#include <netinet/in.h> /* for ntohl() */
-#else
-#include <winsock2.h> /* for ntohl() */
-#endif
-
/* Check that all the mandatory members are present */
static int _SET_is_populated(asn_TYPE_descriptor_t *td, void *st);
@@ -411,7 +405,7 @@ _SET_is_populated(asn_TYPE_descriptor_t *td, void *st) {
midx = edx/(8 * sizeof(specs->_mandatory_elements[0]));
pres = ((unsigned int *)((char *)st+specs->pres_offset))[midx];
- must = ntohl(specs->_mandatory_elements[midx]);
+ must = sys_ntohl(specs->_mandatory_elements[midx]);
if((pres & must) == must) {
/*
@@ -945,7 +939,7 @@ SET_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
int edx;
if(!sptr) {
- _ASN_CTFAIL(app_key, td,
+ _ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
@@ -963,7 +957,7 @@ SET_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
if(!memb_ptr) {
if(elm->optional)
continue;
- _ASN_CTFAIL(app_key, td,
+ _ASN_CTFAIL(app_key, td, sptr,
"%s: mandatory element %s absent (%s:%d)",
td->name, elm->name, __FILE__, __LINE__);
return -1;