nam-1 failed to build when use hardening mode, such as
format-error etc.
Patch attached
another patch: how to add another file ?
--- nam.orig/netmodel.cc 2011-11-24 22:01:28.778528404 +0800 +++ nam/netmodel.cc 2011-11-24 22:02:05.954712753 +0800 @@ -308,7 +308,7 @@ Tcl_HashEntry *he = Tcl_FindHashEntry(addrHash_, (const char *)addr); if (he == NULL) return -1; - return *Tcl_GetHashValue(he); + return *(int *)Tcl_GetHashValue(he); }
//---------------------------------------------------------------------- @@ -2761,7 +2761,7 @@ Tcl_HashEntry *he = Tcl_FindHashEntry(objnameHash_, n); if (he == NULL) return -1; - return *Tcl_GetHashValue(he); + return *(int *)Tcl_GetHashValue(he); #undef STATIC_NAMELEN }
Log in to post a comment.
another patch: how to add another file ?
Index: nam/netmodel.cc
--- nam.orig/netmodel.cc 2011-11-24 22:01:28.778528404 +0800
+++ nam/netmodel.cc 2011-11-24 22:02:05.954712753 +0800
@@ -308,7 +308,7 @@
Tcl_HashEntry *he = Tcl_FindHashEntry(addrHash_, (const char *)addr);
if (he == NULL)
return -1;
- return *Tcl_GetHashValue(he);
+ return *(int *)Tcl_GetHashValue(he);
}
//----------------------------------------------------------------------
@@ -2761,7 +2761,7 @@
Tcl_HashEntry *he = Tcl_FindHashEntry(objnameHash_, n);
if (he == NULL)
return -1;
- return *Tcl_GetHashValue(he);
+ return *(int *)Tcl_GetHashValue(he);
#undef STATIC_NAMELEN
}