summaryrefslogtreecommitdiff
path: root/mactelnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'mactelnet.c')
-rw-r--r--mactelnet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mactelnet.c b/mactelnet.c
index 0f86250..4eebc5f 100644
--- a/mactelnet.c
+++ b/mactelnet.c
@@ -35,7 +35,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
-#ifdef __LINUX__
+#ifdef __linux__
#include <linux/if_ether.h>
#include <sys/mman.h>
#endif
@@ -202,7 +202,7 @@ static void send_auth(char *username, char *password) {
int plen;
md5_state_t state;
-#if defined(__LINUX__) && defined(_POSIX_MEMLOCK_RANGE)
+#if defined(__linux__) && defined(_POSIX_MEMLOCK_RANGE)
mlock(md5data, sizeof(md5data));
mlock(md5sum, sizeof(md5data));
#endif
@@ -473,7 +473,7 @@ int main (int argc, char **argv) {
case 'p':
/* Save password */
-#if defined(__LINUX__) && defined(_POSIX_MEMLOCK_RANGE)
+#if defined(__linux__) && defined(_POSIX_MEMLOCK_RANGE)
mlock(password, sizeof(password));
#endif
strncpy(password, optarg, sizeof(password) - 1);
@@ -637,14 +637,14 @@ int main (int argc, char **argv) {
if (!have_password) {
char *tmp;
tmp = getpass(quiet_mode ? "" : _("Password: "));
-#if defined(__LINUX__) && defined(_POSIX_MEMLOCK_RANGE)
+#if defined(__linux__) && defined(_POSIX_MEMLOCK_RANGE)
mlock(password, sizeof(password));
#endif
strncpy(password, tmp, sizeof(password) - 1);
password[sizeof(password) - 1] = '\0';
/* security */
memset(tmp, 0, strlen(tmp));
-#ifdef __LINUX__
+#ifdef __linux__
free(tmp);
#endif
}