Created
November 24, 2011 21:07
-
-
Save ThomasLocke/1392295 to your computer and use it in GitHub Desktop.
Patch for gnatcoll-traces-syslog.adb that fix a segfault
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- gnatlib/src/syslog/gnatcoll-traces-syslog.adb 2011-11-24 21:42:54.680002883 +0100 | |
+++ gnatlib_new/src/syslog/gnatcoll-traces-syslog.adb 2011-11-24 12:10:24.080001517 +0100 | |
@@ -80,8 +80,6 @@ | |
-- we need to be able to combine levels and facilities in the call | |
-- to syslog... | |
- Percent_S : constant String := "%s" & ASCII.NUL; | |
- | |
type Syslog_Stream_Record is new Trace_Stream_Record with record | |
Buffer : Unbounded_String; | |
Facility : Facilities; | |
@@ -217,16 +215,16 @@ | |
Level : Levels := Emergency; | |
Message : String) | |
is | |
- procedure Internal | |
- (Priority : Integer; | |
- Message : String; | |
- Arg : String); | |
- pragma Import (C, Internal, "syslog"); | |
- -- Low-level binding | |
- begin | |
- Internal (Levels_To_Integer (Level) + Facilities_To_Integer (Facility), | |
- Percent_S, | |
- Message & ASCII.NUL); | |
+ procedure Syslog_Wrapper | |
+ (Priority : Integer; | |
+ Log_Message : String); | |
+ pragma Import (C, Syslog_Wrapper, "syslog_wrapper"); | |
+ -- Imported from src/syslog_wrapper.c | |
+ begin | |
+ Syslog_Wrapper | |
+ (Priority => | |
+ Levels_To_Integer (Level) + Facilities_To_Integer (Facility), | |
+ Log_Message => Message & ASCII.NUL); | |
end Syslog; | |
-------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment