aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Problem With CFile and struct dirent  (Read 7979 times)

moi

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Problem With CFile and struct dirent
« on: March 31, 2005, 08:09:24 PM »

hello
I'm trying to make amule version 2.0.0+rc8 on windows to include some adds to de code.
when compiling I found the following error:

Compiling src/CFile.cpp
src/CFile.cpp: In member function `wxString CDirIterator::FindNextFileA()':
src/CFile.cpp:636: error: 'struct dirent' has no member named 'd_type'
src/CFile.cpp:637: error: `DT_DIR' undeclared (first use this function)
src/CFile.cpp:637: error: (Each undeclared identifier is reported only once for each function it appears in.)
src/CFile.cpp:644: error: `DT_REG' undeclared (first use this function)
make: *** [Debug/CFile.o] Error 1


the header file dirent.h included in CFile.h have a struct dirent
struct dirent
{
   long      d_ino;      /* Always zero. */
   unsigned short   d_reclen;   /* Always zero. */
   unsigned short   d_namlen;   /* Length of name in d_name. */
   char      d_name[FILENAME_MAX]; /* File name. */
};
but no attribut d_type exist.
i use mingw-3.2.0-rc3,msysdtk-1.0.1.


under debian the dirent.h in /usr/include have the correct struct dirent with the d_type attribut .

Can anybody help me?
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Problem With CFile and struct dirent
« Reply #1 on: March 31, 2005, 08:19:58 PM »

Try with a CVS snapshot instead. Just not today's. It's broken. ;)
http://www.hirnriss.net/?area=cvs
Logged