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,14 +44,19 @@
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#if defined(linux)
#include <stdint.h>
#endif
#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 */
#endif
typedef uint32_t ulong; /* must be 32 bits wide */
#endif
typedef unsigned char uchar; /* must be 8 bits wide */
#if defined(linux)
#define ulong uint32_t
#endif
/*
** Error codes {{{

View File

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