Hi Richard,
o Richard Newman [02/17/09 01:10]:
It appears that SEMS 1.1.0 was not tested at all against Solaris 10.
unfortunately not :( sorry for breaking solaris compile.
I just checked, and there are multiple problems: use of PF_UNIX without
importing the socket headers, use of SUN_LEN (which doesn't exist on
you can use sipctrl, and add binrpcctrl to exclude_modules.
Solaris), use of operator+ with a const char * and a std::string (not
defined), and others -- I haven't even got it to compile yet.
Not good.
Here is a quick patch for these issues (it gets through the compilation
errors for them, but *I have not tested the correctness of the code*).
strange, in http://www.sgi.com/tech/stl/basic_string.html I see
basic_string& operator+=(const charT* s). but there should be at least
basic_string(const charT*), so how about this:
Index: AmUtils.cpp
===================================================================
--- AmUtils.cpp (revision 1264)
+++ AmUtils.cpp (working copy)
@@ -981,7 +981,7 @@
#ifndef BSD_COMP
setenv(name,var.c_str(),1);
#else
- string sol_putenv = name + "=" + var;
+ string sol_putenv = name + string("=") + var;
putenv(sol_putenv.c_str());
#endif
}
Please feel free to patch it in both trunk and 1.1 branch - when it
compiles, we can do a 1.1.1 release (including the important xmlrpc
server SSL init fix).
Stefan
There are other issues at which I might look in the future.
I suggest that you start with SEMS trunk and work through the issues,
sending diffs to [email protected].
diff -r sems-1.1.0/core/AmUtils.cpp sems-1.1.0-modified/core/AmUtils.cpp
984,985c984,997
< string sol_putenv = name + "=" + var;
< putenv(sol_putenv.c_str());
---
> // On Solaris, operator+ is not defined for const char * and string.
> // Do it the hard way.
> size_t namelen = strlen(name);
> size_t varlen = var.length();
> char *sol_putenv = (char *)malloc(sizeof(char) * (namelen + varlen
+ 2));
> if (NULL == sol_putenv) {
> ERROR("Could not allocate memory for add_env_path.");
> return;
> }
> strncpy(sol_putenv, name, namelen);
> sol_putenv[namelen] = '=';
> strncpy(sol_putenv + namelen + 1, var.c_str(), varlen);
> sol_putenv[namelen + varlen + 1] = 0;
> putenv(sol_putenv);
diff -r sems-1.1.0/core/compat/solaris.h
sems-1.1.0-modified/core/compat/solaris.h
34a35
> #include <sys/socket.h>
79a81,83
> // Of course Solaris doesn't have SUN_LEN.
> #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) +
strlen((su)->sun_path))
>
-R
On 15 Feb 2009, at 11:09 PM, newbie wrote:
Hi Richard,
Can you kindly let me know if we can compile SEMS in solaris 10?
I have tried and isn't doing anything
here is gmake all
http://pastebin.com/d1673d60e
and here is gmake install
http://pastebin.com/m5127cab9
Regards,
Yasen
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
--
Stefan Sayer
VoIP Services
[email protected]
www.iptego.com
IPTEGO GmbH
Wittenbergplatz 1
10789 Berlin
Germany
Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev