Skip to content
Snippets Groups Projects
Commit 1885e59a authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix some NetBSD warnings

parent 82de7024
No related branches found
No related tags found
No related merge requests found
......@@ -950,8 +950,8 @@ static uint64_t getdiskspace(const char* path, uint64_t unit, bool freespace)
struct statvfs fs;
uint64_t blocks;
if (statvfs(path, &fs) < 0)
return 0;
if (statvfs(path, &fs) < 0)
return 0;
if(freespace)
blocks=fs.f_bavail;
......
......@@ -1183,8 +1183,6 @@ bool xptone(double freq, DWORD duration, enum WAVE_SHAPE shape)
/****************************************************************************/
void unix_beep(int freq, int dur)
{
static int console_fd=-1;
#if (defined(__FreeBSD__) && defined(HAS_MACHINE_SPEAKER_H)) || ((defined(__OpenBSD__) || defined(__NetBSD__)) && defined(HAS_MACHINE_SPKR_H))
int speaker_fd=-1;
tone_t tone;
......@@ -1200,6 +1198,8 @@ void unix_beep(int freq, int dur)
#endif
#if !defined(__GNU__) && !defined(__QNX__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__HAIKU__) && !defined(__EMSCRIPTEN__)
static int console_fd=-1;
if(console_fd == -1)
console_fd = open("/dev/console", O_NOCTTY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment