Mailbox plugin : compilation error

Message ID 424E5ADD.7030709@seca.inka.de
State New
Headers

Commit Message

Alexander Rieger April 2, 2005, 8:42 a.m. UTC
  Hi Jean-Claude Repetto

> I have tried to compile the mailbox plugin V0.1.6, and I got the following error message :
> 
> g++ -O2 -Wall -Woverloaded-virtual -fno-operator-names -D_GNU_SOURCE -c -DPLUGIN_NAME_I18N='"mailbox"'
> -I./AxLibDummy/include -I./AxMail/include -I/usr/include/imap/ -I../../../include -I../../../../DVB/include -o
> AxMail/src/Mail.o AxMail/src/Mail.cpp
> AxMail/src/Mail.cpp: In member function `std::string Ax::Mail::Mail::getDate()
>    const':
> AxMail/src/Mail.cpp:226: error: invalid conversion from `unsigned char*' to `
>    const char*'
> AxMail/src/Mail.cpp:226: error:   initializing argument 1 of `
>    std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*,
>    const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc
>    = std::allocator<char>]'
> make: *** [AxMail/src/Mail.o] Error 1
> 
> 
> I am using gcc V3.3.5.

Please apply the attached patch to the sources of the mailbox-plugin and 
try if it works for you.

Note: I didn't test this patch myself because my environment ist far 
away from vdr-1.2.x and mailbox-0.1.x.

HTH, Alex
  

Comments

Jean-Claude Repetto April 2, 2005, 3:30 p.m. UTC | #1
Alexander Rieger a écrit :

> 
> Please apply the attached patch to the sources of the mailbox-plugin and
> try if it works for you.

Thanks, it solved the problem.

Jean-Claude
  

Patch

diff -Nur mailbox-0.1.6-orig/AxMail/src/Mail.cpp mailbox-0.1.6/AxMail/src/Mail.cpp
--- mailbox-0.1.6-orig/AxMail/src/Mail.cpp	2003-12-19 12:05:53.000000000 +0100
+++ mailbox-0.1.6/AxMail/src/Mail.cpp	2005-04-02 10:35:05.000000000 +0200
@@ -223,7 +223,7 @@ 
 
   if (anEnvelope && anEnvelope->date)
   {
-    aStr = string(anEnvelope->date);
+    aStr = string((const char *)anEnvelope->date);
   } // if
   else
   {