Commit 9a6a339e authored by unknown's avatar unknown

mysys/my_gethwaddr.c

    Fix a typing error in a conditional compiling directive
    (reported by Vasil Dimov: Thanks !),
    and improve their nesting ("MAIN" independent of platform).


mysys/my_gethwaddr.c:
  Fix a typing error, reported by Vasil Dimov (thanks !):
  The condition is meant to apply to FreeBSD or Linux.
  
  Improve the nesting of conditional compiling directives,
  handle "MAIN" and the platform issues independent of each other.
parent 3f8a904f
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
#include "mysys_priv.h" #include "mysys_priv.h"
#include <m_string.h> #include <m_string.h>
#if !defined(__FreeBSD__) || defined(__linux__) #ifndef MAIN
#if defined(__FreeBSD__) || defined(__linux__)
static my_bool memcpy_and_test(uchar *to, uchar *from, uint len) static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
{ {
uint i, res=1; uint i, res=1;
...@@ -29,6 +31,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len) ...@@ -29,6 +31,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
res=0; res=0;
return res; return res;
} }
#endif /* FreeBSD || linux */
#ifdef __FreeBSD__ #ifdef __FreeBSD__
...@@ -98,7 +101,7 @@ err: ...@@ -98,7 +101,7 @@ err:
return res; return res;
} }
#else #else /* FreeBSD elif linux */
/* just fail */ /* just fail */
my_bool my_gethwaddr(uchar *to __attribute__((unused))) my_bool my_gethwaddr(uchar *to __attribute__((unused)))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment