Vladimir Kirillov
2010-Nov-24 20:51 UTC
[LLVMdev] llvm build breakage on OpenBSD after adding system_error
Hello, llvmdev! Subj, not all UNIX systems have that much number of errnos, so I'm attaching the workaround that i've used to build llvm. Hope this gets resolved. Thanks! -------------- next part -------------- diff --git a/include/llvm/System/system_error.h b/include/llvm/System/system_error.h index 3bfc092..2c0fa5c 100644 --- a/include/llvm/System/system_error.h +++ b/include/llvm/System/system_error.h @@ -470,6 +470,16 @@ template <> struct hash<std::error_code>; # endif #endif +#ifndef EBADMSG +# define EBADMSG 104 +#endif +#ifndef ENOLINK +# define ENOLINK 121 +#endif +#ifndef EPROTO +# define EPROTO 134 +#endif + namespace llvm { template <class T, T v>
Michael Spencer
2010-Nov-25 00:37 UTC
[LLVMdev] llvm build breakage on OpenBSD after adding system_error
On Wed, Nov 24, 2010 at 3:51 PM, Vladimir Kirillov <proger at uaoug.org.ua> wrote:> Hello, llvmdev! > > Subj, not all UNIX systems have that much number of errnos, so > I'm attaching the workaround that i've used to build llvm. > Hope this gets resolved. > > Thanks!:(. Apparently POSIX doesn't require these. The attached patch isn't the correct fix because the value of the macros are undefined in the various standards. I've been fixing these by using the ERROR the system would return in conditions where the unsupported ERROR should be, or, in cases where this information isn't available, EINVAL. Thanks for reporting the problem! I'll go and fix these, let me know if it still doesn't work. - Michael Spencer