Hacky fix for Linux

This commit is contained in:
Andrew Pamment 2016-03-23 19:09:51 -04:00
parent 287ebcdf65
commit cfa6b20d5d
2 changed files with 10 additions and 2 deletions

View File

@ -44,7 +44,9 @@
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <ctype.h> #include <ctype.h>
#if defined(linux)
#include <stdint.h>
#endif
#if !defined(linux) #if !defined(linux)
#if !(((defined(__FreeBSD__) && __FreeBSD_version >= 440000)) || defined(NeXTBSD)) #if !(((defined(__FreeBSD__) && __FreeBSD_version >= 440000)) || defined(NeXTBSD))
typedef unsigned short ushort; /* must be 16 bits wide */ typedef unsigned short ushort; /* must be 16 bits wide */
@ -52,6 +54,9 @@ typedef unsigned short ushort; /* must be 16 bits wide */
typedef uint32_t ulong; /* must be 32 bits wide */ typedef uint32_t ulong; /* must be 32 bits wide */
#endif #endif
typedef unsigned char uchar; /* must be 8 bits wide */ typedef unsigned char uchar; /* must be 8 bits wide */
#if defined(linux)
#define ulong uint32_t
#endif
/* /*
** Error codes {{{ ** Error codes {{{

View File

@ -612,15 +612,18 @@ int mail_menu(int socket, struct user_record *user) {
for (j=i;j<jbh.ActiveMsgs;j++) { for (j=i;j<jbh.ActiveMsgs;j++) {
z = JAM_ReadMsgHeader(jb, j, &jmh, &jsp); z = JAM_ReadMsgHeader(jb, j, &jmh, &jsp);
if (z != 0) { if (z != 0) {
printf("Failed to read msg header: %d Erro %d\n", z, JAM_Errno(jb));
continue; continue;
} }
if (jmh.Attribute & MSG_DELETED) { if (jmh.Attribute & MSG_DELETED) {
printf("Deleted MSG\n");
JAM_DelSubPacket(jsp); JAM_DelSubPacket(jsp);
continue; continue;
} }
if (jmh.Attribute & MSG_NODISP) { if (jmh.Attribute & MSG_NODISP) {
printf("No Display\n");
JAM_DelSubPacket(jsp); JAM_DelSubPacket(jsp);
continue; continue;
} }