X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FSingletonStackTrace.cpp;h=48bb72cf86c551c5d637b601cf79fb9ed371e969;hb=1d11ad7a0af6277ca6ed2ad147ac16a2e7ac3760;hp=3e1f87cc3f98bbf165be8a2083917bbd54991d55;hpb=d58181e677965b609be89b49ed7fbc4e78bf70b5;p=folly.git diff --git a/folly/SingletonStackTrace.cpp b/folly/SingletonStackTrace.cpp index 3e1f87cc..48bb72cf 100644 --- a/folly/SingletonStackTrace.cpp +++ b/folly/SingletonStackTrace.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2015 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,8 +46,12 @@ struct SetStackTraceGetter { } }; +#ifdef __APPLE__ +// OS X doesn't support constructor priorities. SetStackTraceGetter setStackTraceGetter; - +#else +SetStackTraceGetter __attribute__((__init_priority__(101))) setStackTraceGetter; +#endif } }